public <T> T getPort(EndpointReferenceType endpointReference, Class<T> type) { return getPort(endpointReference, type, new WebServiceFeature[]{}); }
public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, @SuppressWarnings("rawtypes") Class serviceClass, WebServiceFeature ... features) { for (WebServiceFeature f : features) { if (!f.getClass().getName().startsWith("javax.xml.ws") && !(f instanceof Feature)) { throw new WebServiceException("Unknown feature error: " + f.getClass().getName()); } } return new ServiceImpl(null, wsdlDocumentLocation, serviceName, serviceClass, features); }
@Override public Dispatch<Object> createDispatch(QName portName, JAXBContext context, Mode mode, WebServiceFeature... features) { return createDispatch(portName, Object.class, context, mode, features); }
@Override public <T> Dispatch<T> createDispatch(EndpointReference endpointReference, Class<T> type, Mode mode, WebServiceFeature... features) { EndpointReferenceType ref = ProviderImpl.convertToInternal(endpointReference); QName portName = EndpointReferenceUtils.getPortQName(ref, bus); updatePortInfoAddress(portName, EndpointReferenceUtils.getAddress(ref)); return createDispatch(portName, type, mode, features); }
public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException { if (field.getAnnotation(WebServiceRef.class) != null) { ServiceImpl s = new ServiceImpl(getBus(), null, null, field.getType()); s.addPort(new QName("port"), JBITransportFactory.TRANSPORT_ID, "jbi://" + ID_GENERATOR.generateSanitizedId()); Object o = s.getPort(new QName("port"), field.getType()); field.setAccessible(true); field.set(getPojo(), o); } } });
configureObject(portName.toString() + ".jaxws-client.proxyFactory", clientFac); db = new SourceDataBinding(type); sf = createDispatchService(db); } catch (ServiceConstructionException e) { throw new WebServiceException(e); JaxWsEndpointImpl endpoint = getJaxwsEndpoint(portName, sf, features); Bus clientBus = getBus(); if (clientFac.getBus() != BusFactory.getThreadDefaultBus(false) && clientFac.getBus() != null) { initIntercepors(client, clientFac); if (executor != null) { client.getEndpoint().setExecutor(executor); configureObject(disp); return disp;
JaxWsClientFactoryBean clientFac = (JaxWsClientFactoryBean) proxyFac.getClientFactoryBean(); JaxWsServiceFactoryBean serviceFactory = (JaxWsServiceFactoryBean) proxyFac.getServiceFactory(); List<WebServiceFeature> f = getAllFeatures(features); proxyFac.initFeatures(); if (f != null) { configureObject(proxyFac); configureObject(clientFac); QName portTypeName = getPortTypeName(serviceEndpointInterface); serviceFactory.setBus(getBus()); service = serviceFactory.create(); configureObject(service); client.setExecutor(executor); JaxWsEndpointImpl jaxwsEndpoint = (JaxWsEndpointImpl) client.getEndpoint(); configureObject(jaxwsEndpoint); @SuppressWarnings("rawtypes") List<Handler> hc = jaxwsEndpoint.getJaxwsBinding().getHandlerChain(); LOG.log(Level.FINE, "created proxy", obj); if (portInfo == null) { addPort(portName, clientFac.getBindingId(), clientFac.getAddress());
private synchronized ServiceImpl getService() { if (service == null) { Bus b = BusFactory.getAndSetThreadDefaultBus(bus); try { service = new ServiceImpl(bus, null, version.getServiceName(), Service.class); service.addPort(version.getServiceName(), soapVersion, address); } finally { BusFactory.setThreadDefaultBus(b); } } return service; } private synchronized void resetDispatch(String newad) {
protected <T> T createPort(QName portName, EndpointReferenceType epr, Class<T> serviceEndpointInterface) { return createPort(portName, epr, serviceEndpointInterface, new WebServiceFeature[]{}); }
private void configureObject(Object instance) { configureObject(null, instance); }
configureObject(portName.toString() + ".jaxws-client.proxyFactory", clientFac); db = new SourceDataBinding(type); sf = createDispatchService(db); } catch (ServiceConstructionException e) { throw new WebServiceException(e); JaxWsEndpointImpl endpoint = getJaxwsEndpoint(portName, sf, features); Bus clientBus = getBus(); if (clientFac.getBus() != BusFactory.getThreadDefaultBus(false) && clientFac.getBus() != null) { initIntercepors(client, clientFac); if (executor != null) { client.getEndpoint().setExecutor(executor); configureObject(disp); return disp;
JaxWsClientFactoryBean clientFac = (JaxWsClientFactoryBean) proxyFac.getClientFactoryBean(); JaxWsServiceFactoryBean serviceFactory = (JaxWsServiceFactoryBean) proxyFac.getServiceFactory(); List<WebServiceFeature> f = getAllFeatures(features); proxyFac.initFeatures(); if (f != null) { configureObject(proxyFac); configureObject(clientFac); QName portTypeName = getPortTypeName(serviceEndpointInterface); serviceFactory.setBus(getBus()); service = serviceFactory.create(); configureObject(service); client.setExecutor(executor); JaxWsEndpointImpl jaxwsEndpoint = (JaxWsEndpointImpl) client.getEndpoint(); configureObject(jaxwsEndpoint); @SuppressWarnings("rawtypes") List<Handler> hc = jaxwsEndpoint.getJaxwsBinding().getHandlerChain(); LOG.log(Level.FINE, "created proxy", obj); if (portInfo == null) { addPort(portName, clientFac.getBindingId(), clientFac.getAddress());
private synchronized ServiceImpl getService() { if (service == null) { Bus b = BusFactory.getAndSetThreadDefaultBus(bus); try { service = new ServiceImpl(bus, null, version.getServiceName(), Service.class); service.addPort(version.getServiceName(), soapVersion, address); } finally { BusFactory.setThreadDefaultBus(b); } } return service; } private synchronized void resetDispatch(String newad) {
@Override public Dispatch<Object> createDispatch(EndpointReference endpointReference, JAXBContext context, Mode mode, WebServiceFeature... features) { EndpointReferenceType ref = ProviderImpl.convertToInternal(endpointReference); QName portName = EndpointReferenceUtils.getPortQName(ref, bus); updatePortInfoAddress(portName, EndpointReferenceUtils.getAddress(ref)); return createDispatch(portName, context, mode, features); }
public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features) { try { return createPort(null, null, serviceEndpointInterface, features); } catch (ServiceConstructionException e) { throw new WebServiceException(e); } }
private void configureObject(Object instance) { configureObject(null, instance); }
public <T> T getPort(Class<T> serviceEndpointInterface) { return getPort(serviceEndpointInterface, new WebServiceFeature[]{}); }
@Override public Dispatch<Object> createDispatch(QName portName, JAXBContext context, Mode mode) { return createDispatch(portName, context, mode, new WebServiceFeature[]{}); }