use of org.apache.cxf.systest.jaxrs.jaxws.UserImpl in project cxf by apache.
the class JAXRSSoapBookTest method doTestHelloSoapCustomDataBinding.
private void doTestHelloSoapCustomDataBinding(String address) throws Exception {
final QName serviceName = new QName("http://hello.com", "HelloWorld");
final QName portName = new QName("http://hello.com", "HelloWorldPort");
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, address);
HelloWorld hw = service.getPort(HelloWorld.class);
Client cl = ClientProxy.getClient(hw);
HTTPConduit http = (HTTPConduit) cl.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setConnectionTimeout(0);
httpClientPolicy.setReceiveTimeout(0);
http.setClient(httpClientPolicy);
User user = new UserImpl("Barry");
User user2 = hw.echoUser(user);
assertNotSame(user, user2);
assertEquals("Barry", user2.getName());
}
Aggregations