base = baseUri.substring(0, baseUri.toLowerCase().indexOf("?xsd="));
xsd = baseUri.substring(baseUri.toLowerCase().indexOf("?xsd=") + 5);
}
if (!mp.containsKey(wsdl)) {
WSDLFactory factory = WSDLFactory.newInstance();
WSDLReader reader = factory.newWSDLReader();
reader.setFeature("javax.wsdl.importDocuments", true);
reader.setFeature("javax.wsdl.verbose", false);
Definition def = reader.readWSDL(wsdlUri);
updateDefinition(def, mp, smp, base);
updateServices(this.service.getName(), this.service.getEndpointName(), def, base);
mp.put("", def);
}
Element rootElement;
if (xsd == null) {
Definition def = mp.get(wsdl);
WSDLFactory factory = WSDLFactory.newInstance();
WSDLWriter writer = factory.newWSDLWriter();
rootElement = writer.getDocument(def).getDocumentElement();
} else {
SchemaReference si = smp.get(xsd);
rootElement = si.getReferencedSchema().getElement();