use of org.apache.cxf.endpoint.ServiceContractResolverRegistry in project cxf by apache.
the class ServiceImpl method initialize.
final void initialize(Bus b, URL url, WebServiceFeature... f) {
if (b == null) {
b = BusFactory.getThreadDefaultBus(true);
}
serviceFeatures = f;
bus = b;
handlerResolver = new HandlerResolverImpl(bus, serviceName, clazz);
if (null == url && null != bus) {
ServiceContractResolverRegistry registry = bus.getExtension(ServiceContractResolverRegistry.class);
if (null != registry) {
URI uri = registry.getContractLocation(serviceName);
if (null != uri) {
try {
url = uri.toURL();
} catch (MalformedURLException e) {
LOG.log(Level.FINE, "resolve qname failed", serviceName);
throw new WebServiceException(e);
}
}
}
}
wsdlURL = url == null ? null : url.toString();
if (url != null) {
try {
initializePorts();
} catch (ServiceConstructionException e) {
throw new WebServiceException(e);
}
}
}
Aggregations