private void addAdditionalXmlSchema(ClientResponse response, String requestedEntity) { if (response.appData.getElementsByTagNameNS(null, "ResponseTemplate").getLength() > 0) { Node responseTemplateNode = response.appData.getElementsByTagNameNS("", "ResponseTemplate").item(0); Node typeAttr = responseTemplateNode .getAttributes() .getNamedItemNS("http://www.w3.org/2001/XMLSchema-instance", "type"); String attributeValue = typeAttr.getNodeValue(); String schemaURI = EXPORT_ENTITY_SCHEMA_MAP.get(requestedEntity); response.appData.setAttributeNS( "http://www.w3.org/2000/xmlns/", "xmlns:" + attributeValue.split(":")[0], schemaURI); } }
private String getPersonDocumentId(ExchangeContext ctx, String suffix, String payerType) { String documentVarName = PERSON_DOCUMENT_ID_MAP.get(payerType); documentVarName = documentVarName + suffix; return getStringFromContext(ctx, documentVarName, "").replace("-", "").toUpperCase(); }