use of org.apache.cxf.systest.jaxrs.jaxws.HelloWorld in project cxf by apache.
the class JAXRSSoapBookTest method testHelloRest.
@Test
public void testHelloRest() throws Exception {
String address = "http://localhost:" + PORT + "/test/services/hello-rest";
HelloWorld service = JAXRSClientFactory.create(address, HelloWorld.class);
useHelloService(service);
}
use of org.apache.cxf.systest.jaxrs.jaxws.HelloWorld in project cxf by apache.
the class JAXRSSoapRestBlueprintTest method testHelloSoap.
@Test
public void testHelloSoap() throws Exception {
final QName serviceName = new QName("http://hello.com", "HelloWorld");
final QName portName = new QName("http://hello.com", "HelloWorldPort");
final String address = "http://localhost:" + PORT + "/bp/services/hello-soap";
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, address);
HelloWorld hw = service.getPort(HelloWorld.class);
useHelloService(hw);
}
use of org.apache.cxf.systest.jaxrs.jaxws.HelloWorld 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());
}
use of org.apache.cxf.systest.jaxrs.jaxws.HelloWorld in project cxf by apache.
the class JAXRSSoapBookTest method testHelloSoap.
@Test
public void testHelloSoap() throws Exception {
final QName serviceName = new QName("http://hello.com", "HelloWorld");
final QName portName = new QName("http://hello.com", "HelloWorldPort");
final String address = "http://localhost:" + PORT + "/test/services/hello-soap";
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, address);
HelloWorld hw = service.getPort(HelloWorld.class);
useHelloService(hw);
}
use of org.apache.cxf.systest.jaxrs.jaxws.HelloWorld in project cxf by apache.
the class JAXRSSoapRestBlueprintTest method testHelloRest.
@Test
public void testHelloRest() throws Exception {
String address = "http://localhost:" + PORT + "/bp/services/hello-rest";
HelloWorld service = JAXRSClientFactory.create(address, HelloWorld.class);
useHelloService(service);
}
Aggregations