public void setAddress(String add) { clientFactoryBean.setAddress(add); }
public void setAddress(String add) { clientFactoryBean.setAddress(add); }
AegisDatabinding dataBinding = ... {your dataBinding}; ClientFactoryBean clientProxyFactoryBean = new ClientFactoryBean(); clientProxyFactoryBean.setDataBinding(dataBinding); // Path to wsdl clientProxyFactoryBean.setAddress("http://servername/app?wsdl"); // implemented service clientProxyFactoryBean.setServiceClass(com.exigen.aaa.rating.home.ca.RatingService.class); Client client = clientProxyFactoryBean.create(); DataReader<XMLStreamReader> dataReader = dataBinding.createReader(XMLStreamReader.class); String tempData = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body>..."; XMLInputFactory factory = XMLInputFactory.newInstance(); XMLStreamReader streamReader = factory.createXMLStreamReader(new StringReader(tempData)); // miss all soap messages while (true) { if (streamReader.isStartElement()) { System.out.println(streamReader.getName()); if ("{http://your.object.value/}arg1".equals(streamReader.getName().toString())) { break; } } streamReader.next(); } Object result = dataReader.read(streamReader);
private CreditAgencyWS getProxy() { // Here we use JaxWs front end to create the proxy JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean(); clientBean.setAddress(creditAgencyAddress); clientBean.setServiceClass(CreditAgencyWS.class); clientBean.setBus(BusFactory.getDefaultBus()); return (CreditAgencyWS)proxyFactory.create(); }
public Client createClient(String address, String soapVersion) { return withContextClassLoader(CxfClientFactory.class.getClassLoader(), () -> { ClientFactoryBean factory = new ClientFactoryBean(); factory.setServiceClass(ProxyService.class); factory.setDataBinding(new StaxDataBinding()); factory.getFeatures().add(new StaxDataBindingFeature()); factory.setAddress(address); factory.setBus(bus); factory.setBindingId(getBindingIdForSoapVersion(soapVersion)); return factory.create(); }); }
if (!useServiceRegistry) { String endpointUrl = (useServiceLocator) ? "locator://" + serviceName.getLocalPart() : publishedEndpointUrl; clientFactory.setAddress(endpointUrl);
if (!useServiceRegistry) { String endpointUrl = (useServiceLocator) ? "locator://" + serviceName.getLocalPart() : publishedEndpointUrl; clientFactory.setAddress(endpointUrl);
public static LoanBrokerWS getProxy(String address) { // Now we use the simple front API to create the client proxy ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean(); ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean(); clientBean.setAddress(address); clientBean.setServiceClass(LoanBrokerWS.class); // just create a new bus for use clientBean.setBus(BusFactory.newInstance().createBus()); return (LoanBrokerWS) proxyFactory.create(); }
cpf.setDataBinding(new StaxDataBinding()); cpf.getFeatures().add(new StaxDataBindingFeature()); cpf.setAddress(getAddress()); cpf.setBus(getBus()); cpf.setProperties(properties);
cpf.setAddress(getAddress()); cpf.setBus(getBus()); cpf.setProperties(properties);
factoryBean.setAddress(getAddress());