Search in sources :

Example 1 with HandlerResolverImpl

use of org.apache.cxf.jaxws.handler.HandlerResolverImpl 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);
        }
    }
}
Also used : HandlerResolverImpl(org.apache.cxf.jaxws.handler.HandlerResolverImpl) MalformedURLException(java.net.MalformedURLException) WebServiceException(javax.xml.ws.WebServiceException) ServiceContractResolverRegistry(org.apache.cxf.endpoint.ServiceContractResolverRegistry) ServiceConstructionException(org.apache.cxf.service.factory.ServiceConstructionException) URI(java.net.URI)

Aggregations

MalformedURLException (java.net.MalformedURLException)1 URI (java.net.URI)1 WebServiceException (javax.xml.ws.WebServiceException)1 ServiceContractResolverRegistry (org.apache.cxf.endpoint.ServiceContractResolverRegistry)1 HandlerResolverImpl (org.apache.cxf.jaxws.handler.HandlerResolverImpl)1 ServiceConstructionException (org.apache.cxf.service.factory.ServiceConstructionException)1