public JaxWsProxyFactoryBean() { super(new JaxWsClientFactoryBean()); } public JaxWsProxyFactoryBean(ClientFactoryBean fact) {
private Client createClientFromFactoryBean() { JaxWsClientFactoryBean cpf = new JaxWsClientFactoryBean(); cpf.setServiceClass(serviceClass); if (databinding == null) { cpf.setDataBinding(databinding); } cpf.setAddress(getAddress()); cpf.setBus(getBus()); cpf.setProperties(properties); // If there's a soapVersion defined then the corresponding bindingId will be set if(soapVersion != null) { cpf.setBindingId(CxfUtils.getBindingIdForSoapVersion(soapVersion)); } if (wsdlLocation != null) { cpf.setWsdlURL(wsdlLocation); } return cpf.create(); }
JaxWsClientFactoryBean factory = new JaxWsClientFactoryBean(); factory.setServiceClass(MyServiceInterface.class); factory.setAddress("myEndpoint"); List<Interceptor<? extends Message>> interceptors = new ArrayList<Interceptor<? extends Message>>(); interceptors.add(new HeaderOutInterceptor()); factory.setOutInterceptors(interceptors); factory.setBindingId("http://www.w3.org/2003/05/soap/bindings/HTTP/");//soap 1.2 MyServiceInterface service = (MyServiceInterface) factory.create();
@Test public void verifyServices() throws Exception { JaxWsClientFactoryBean cf = new JaxWsClientFactoryBean(); cf.setAddress("local://services/Alger"); cf.setServiceClass(IWebServiceRUs.class); Client client = cf.create(); String response = (String)client.invoke("consultTheOracle")[0]; assertEquals("All your bases belong to us.", response); Service service = WebServiceRUs.getService(); assertEquals(JAXBDataBinding.class, service.getDataBinding().getClass()); }
JaxWsClientFactoryBean clientFactoryBean = new JaxWsClientFactoryBean(); clientFactoryBean.setServiceClass(DocumentManagementForUnderwritingService.class); clientFactoryBean.setAddress(serviceURL); JaxWsProxyFactoryBean pfb = new JaxWsProxyFactoryBean(clientFactoryBean); DocumentUploadHandler.enableSoapClientOutputAttachments(pfb); DocumentManagementForUnderwritingService proxyy = (DocumentManagementForUnderwritingService) pfb.create();
&& epr.getAddress() != null && epr.getAddress().getValue() != null) { clientFac.setAddress(epr.getAddress().getValue()); clientFac.setEndpointReference(epr); clientFac.setBindingId(portInfo.getBindingID()); clientFac.setAddress(portInfo.getAddress()); LOG.log(Level.FINE, "created proxy", obj); if (portInfo == null) { addPort(portName, clientFac.getBindingId(), clientFac.getAddress());
JaxWsClientFactoryBean instance = new JaxWsClientFactoryBean(); if (this.wsdl == null) { Configurer configurer = this.bus.getExtension(Configurer.class); configurer.configureBean(this.portQName.toString() + ".jaxws-client.proxyFactory", instance); //$NON-NLS-1$ this.outInterceptors = instance.getOutInterceptors();
&& epr.getAddress() != null && epr.getAddress().getValue() != null) { clientFac.setAddress(epr.getAddress().getValue()); clientFac.setEndpointReference(epr); clientFac.setBindingId(portInfo.getBindingID()); clientFac.setAddress(portInfo.getAddress()); LOG.log(Level.FINE, "created proxy", obj); if (portInfo == null) { addPort(portName, clientFac.getBindingId(), clientFac.getAddress());
public JaxWsProxyFactoryBean() { super(new JaxWsClientFactoryBean()); } public JaxWsProxyFactoryBean(ClientFactoryBean fact) {