/** * Create a Client that uses a specific EndpointImpl. * @param bus * @param wsdlUrl * @param service * @param port * @param endpointImplFactory */ public ClientImpl(Bus bus, URL wsdlUrl, QName service, QName port, EndpointImplFactory endpointImplFactory) { this.bus = bus; outFaultObserver = new ClientOutFaultObserver(bus); Service svc = service == null ? bus.getExtension(WSDLServiceFactory.class).create(wsdlUrl) : bus.getExtension(WSDLServiceFactory.class).create(wsdlUrl, service); EndpointInfo epfo = findEndpoint(svc, port); try { if (endpointImplFactory != null) { getConduitSelector().setEndpoint(endpointImplFactory.newEndpointImpl(bus, svc, epfo)); } else { getConduitSelector().setEndpoint(new EndpointImpl(bus, svc, epfo)); } } catch (EndpointException epex) { throw new IllegalStateException("Unable to create endpoint: " + epex.getMessage(), epex); } notifyLifecycleManager(); }
/** * Create a Client that uses a specific EndpointImpl. * @param bus * @param wsdlUrl * @param service * @param port * @param endpointImplFactory */ public ClientImpl(Bus bus, URL wsdlUrl, QName service, QName port, EndpointImplFactory endpointImplFactory) { this.bus = bus; outFaultObserver = new ClientOutFaultObserver(bus); Service svc = service == null ? bus.getExtension(WSDLServiceFactory.class).create(wsdlUrl) : bus.getExtension(WSDLServiceFactory.class).create(wsdlUrl, service); EndpointInfo epfo = findEndpoint(svc, port); try { if (endpointImplFactory != null) { getConduitSelector().setEndpoint(endpointImplFactory.newEndpointImpl(bus, svc, epfo)); } else { getConduitSelector().setEndpoint(new EndpointImpl(bus, svc, epfo)); } } catch (EndpointException epex) { throw new IllegalStateException("Unable to create endpoint: " + epex.getMessage(), epex); } notifyLifecycleManager(); }