OMNamespace ns = omElement.getNamespace();
if (ns != null) {
String nsUri = omElement.getNamespace().getNamespaceURI();
if (org.apache.axis2.namespace.Constants.NS_URI_WSDL11.equals(nsUri)) {
endpoint = new WSDL11EndpointBuilder().
createEndpointDefinitionFromWSDL(
wsdlURI.trim(), omElement, serviceName, portName);
} else if (WSDL2Constants.WSDL_NAMESPACE.equals(nsUri)) {
//endpoint = new WSDL20EndpointBuilder().
// createEndpointDefinitionFromWSDL(wsdlURI, serviceName, portName);
handleException("WSDL 2.0 Endpoints are currently not supported");
}
}
}
} catch (Exception e) {
handleException("Couldn't create endpoint from the given WSDL URI : "
+ e.getMessage(), e);
}
}
// check if the wsdl 1.1 document is supplied inline
OMElement definitionElement = wsdlElement.getFirstChildWithName
(new QName(org.apache.axis2.namespace.Constants.NS_URI_WSDL11, "definitions"));
if (endpoint == null && definitionElement != null) {
wsdlEndpoint.setWsdlDoc(definitionElement);
String resolveRoot = properties.get(SynapseConstants.RESOLVE_ROOT).toString();
// String resolveRoot = SynapseConfigUtils.getResolveRoot();
String baseUri = "file:./";
if (resolveRoot != null) {
baseUri = resolveRoot.trim();
}
if (!baseUri.endsWith(File.separator)) {
baseUri = baseUri + File.separator;
}
endpoint = new WSDL11EndpointBuilder().createEndpointDefinitionFromWSDL(
baseUri, definitionElement, serviceName, portName);
}
// check if a wsdl 2.0 document is supplied inline
OMElement descriptionElement = wsdlElement.getFirstChildWithName