public AdhocQueryResponseParser(OMElement ele) throws XdsInternalException { this.ele = ele; response.ele = ele; response.status = ele.getAttributeValue(MetadataSupport.status_qname); response.registryErrorList = new RegistryErrorListParser(ele).getRegistryErrorList(); response.registryObjectListEle = XmlUtil.firstDecendentWithLocalName(ele, "RegistryObjectList"); response.registryErrorListEle = XmlUtil.firstDecendentWithLocalName(ele, "RegistryErrorList"); }
public RegistryErrorListParser(OMElement registryErrorListEle) { if (registryErrorListEle == null) return; if (!registryErrorListEle.getLocalName().equals("RegistryErrorList")) { registryErrorListEle = XmlUtil.firstDecendentWithLocalName(registryErrorListEle, "RegistryErrorList"); if (registryErrorListEle == null) return; } for (OMElement registry_error : XmlUtil.childrenWithLocalName(registryErrorListEle, "RegistryError")) { RegistryError registryError = new RegistryError(); registryErrorList.add(registryError); String severity = get_att(registry_error, "severity"); if (severity == null) registryError.isWarning = false; else if (severity.endsWith("Warning")) registryError.isWarning = true; else registryError.isWarning = false; registryError.codeContext = get_att(registry_error, "codeContext"); registryError.errorCode = get_att(registry_error, "errorCode"); registryError.location = get_att(registry_error, "location"); } }
void parse() throws XdsInternalException { response = new RegistryResponse(); response.success = is_error(); response.topElement = response_element; OMElement registry_error_list = null; if (response_element.getLocalName().equals("RegistryErrorList")) registry_error_list = response_element; else registry_error_list = XmlUtil.firstChildWithLocalName(response_element, "RegistryErrorList") ; if (registry_error_list == null) return; response.registryErrorList = new RegistryErrorListParser(registry_error_list).getRegistryErrorList(); }