private Client getClient() throws BusException, EndpointException { if (client == null) { client = clientFactory.create(); if (null != authorizationPolicy) { HTTPConduit conduit = (HTTPConduit) client.getConduit(); conduit.setAuthorization(authorizationPolicy); } } return client; }
private Client getClient() throws BusException, EndpointException { if (client == null) { client = clientFactory.create(); if (null != authorizationPolicy) { HTTPConduit conduit = (HTTPConduit) client.getConduit(); conduit.setAuthorization(authorizationPolicy); } } return client; }
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);
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(); }); }
Client client = cpf.create();
Client c = clientFactoryBean.create(); if (getInInterceptors() != null) { c.getInInterceptors().addAll(getInInterceptors());
Client c = clientFactoryBean.create(); if (getInInterceptors() != null) { c.getInInterceptors().addAll(getInInterceptors());
return cpf.create();
Client client = factoryBean.create();
Client client = factoryBean.create();