try {
wsdlElement = buildOMElement(new String(wsdlContentBytes));
} catch (Exception e) {
String msg = "Error in building the wsdl element for path: " + wsdlPath + ".";
log.error(msg, e);
throw new RegistryException(msg, e);
}
// saving soap11 endpoints
List<OMElement> soap11Elements;
try {
soap11Elements = evaluateXPathToElements(SOAP11_ENDPOINT_EXPR, wsdlElement);
} catch (Exception e) {
String msg = "Error in evaluating xpath expressions to extract endpoints, wsdl path: " + wsdlPath + ".";
log.error(msg, e);
throw new RegistryException(msg, e);
}
for (OMElement soap11Element: soap11Elements) {
String locationUrl = soap11Element.getAttributeValue(new QName(LOCATION_ATTR));
Map<String, String> properties = new HashMap<String, String>();
properties.put(CommonConstants.SOAP11_ENDPOINT_ATTRIBUTE, "true");
saveEndpoint(registry, locationUrl, wsdlPath, properties, systemRegistry);
}
// saving soap12 endpoints
List<OMElement> soap12Elements;
try {
soap12Elements = evaluateXPathToElements(SOAP12_ENDPOINT_EXPR, wsdlElement);
} catch (Exception e) {
String msg = "Error in evaluating xpath expressions to extract endpoints, wsdl path: " + wsdlPath + ".";
log.error(msg, e);
throw new RegistryException(msg, e);
}
for (OMElement soap12Element: soap12Elements) {
String locationUrl = soap12Element.getAttributeValue(new QName(LOCATION_ATTR));
Map<String, String> properties = new HashMap<String, String>();
properties.put(CommonConstants.SOAP12_ENDPOINT_ATTRIBUTE, "true");
saveEndpoint(registry, locationUrl, wsdlPath, properties, systemRegistry);
}
// saving http endpoints
List<OMElement> httpElements;
try {
httpElements = evaluateXPathToElements(HTTP_ENDPOINT_EXPR, wsdlElement);
} catch (Exception e) {
String msg = "Error in evaluating xpath expressions to extract endpoints, wsdl path: " + wsdlPath + ".";
log.error(msg, e);
throw new RegistryException(msg, e);
}
for (OMElement httpElement: httpElements) {
String locationUrl = httpElement.getAttributeValue(new QName(LOCATION_ATTR));
Map<String, String> properties = new HashMap<String, String>();
properties.put(CommonConstants.HTTP_ENDPOINT_ATTRIBUTE, "true");