if (wsdlLocation != null) {
try {
wsdlRegistry.loadDefinition(wsdlLocation, deploymentContext.getClassLoader());
} catch (IOException e) {
LoaderException le = new LoaderException(e);
le.setIdentifier(wsdlLocation);
throw le;
} catch (WSDLException e) {
LoaderException le = new LoaderException(e);
le.setIdentifier(wsdlLocation);
throw le;
}
}
PortType portType = getPortType(interfaceURI);
if (portType == null) {
throw new MissingResourceException(interfaceURI);
}
PortType callback = null;
if (callbackURI != null) {
callback = getPortType(callbackURI);
}
try {
WSDLServiceContract contract = introspector.introspect(portType, callback);
DataType<?> dataType = (DataType<?>) extensions.get(DataType.class);
if (dataType != null) {
contract.setDataBinding(dataType.getDataBinding());
}
contract.getExtensions().putAll(extensions);
return contract;
} catch (InvalidServiceContractException e) {
LoaderException le = new LoaderException(e);
le.setIdentifier(wsdlLocation);
throw le;
}
}