URL wsdlLoc = new URL(wsdlDocumentLocation);
WSDLModelImpl wsdlDoc = RuntimeWSDLParser.parse(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), er,
true, container, ServiceFinder.find(WSDLParserExtension.class).toArray());
if (serviceName != null) {
WSDLService wsdlService = wsdlDoc.getService(serviceName);
if (wsdlService == null)
throw new IllegalStateException(ProviderApiMessages.NOTFOUND_SERVICE_IN_WSDL(
serviceName,wsdlDocumentLocation));
if (portName != null) {
WSDLPort wsdlPort = wsdlService.get(portName);
if (wsdlPort == null)
throw new IllegalStateException(ProviderApiMessages.NOTFOUND_PORT_IN_WSDL(
portName,serviceName,wsdlDocumentLocation));
}
wsdlTargetNamespace = serviceName.getNamespaceURI();