// TODO: Change this to use WSDLToAxisServiceBuilder superclass
// Note that the axis service builder takes only the localpart of the port qname.
// TODO:: This should check that the namespace of the definition matches the namespace of the portQName per JAXRPC spec
WSDL11ToAxisServiceBuilder serviceBuilder =
new WSDL11ToAxisServiceBuilder( getServiceDescriptionImpl().getWSDLWrapper().getDefinition(),
getServiceDescription().getServiceQName(),
getPortQName().getLocalPart());
if (getServiceDescriptionImpl().isDBCMap()) {
//this.class.getClass().getClassLoader();
URIResolverImpl uriResolver =
new URIResolverImpl(composite.getClassLoader());
serviceBuilder.setCustomResolver(uriResolver);
}
else {
ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged(new
PrivilegedAction() {
public Object run() {
return Thread.currentThread().getContextClassLoader();
}
});
URIResolverImpl uriResolver = new URIResolverImpl(classLoader);
serviceBuilder.setCustomResolver(uriResolver);
}
// TODO: Currently this only builds the client-side AxisService;
// it needs to do client and server somehow.
// Patterned after AxisService.createClientSideAxisService
if (getServiceDescriptionImpl().isServerSide())
serviceBuilder.setServerSide(true);
else
serviceBuilder.setServerSide(false);
axisService = serviceBuilder.populateService();
axisService.setName(createAxisServiceName());
isBuiltFromWSDL = true;
} catch (AxisFault e) {
// REVIEW: If we couldn't use the WSDL, should we fail instead of continuing to process using annotations?