use of org.apache.hello_world_soap_http.DocLitBare in project cxf by apache.
the class ClientServerTest method testDocLitBareConnection.
@Test
public void testDocLitBareConnection() throws Exception {
SOAPServiceDocLitBare service = new SOAPServiceDocLitBare();
assertNotNull(service);
DocLitBare greeter = service.getPort(portName1, DocLitBare.class);
updateAddressPort(greeter, BARE_PORT);
try {
BareDocumentResponse bareres = greeter.testDocLitBare("MySimpleDocument");
assertNotNull("no response for operation testDocLitBare", bareres);
assertEquals("CXF", bareres.getCompany());
assertTrue(bareres.getId() == 1);
} catch (UndeclaredThrowableException ex) {
throw (Exception) ex.getCause();
}
}
use of org.apache.hello_world_soap_http.DocLitBare in project cxf by apache.
the class ClientServerTest method testMultiPorts.
@Test
public void testMultiPorts() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
assertNotNull(wsdl);
QName sname = new QName("http://apache.org/hello_world_soap_http", "SOAPServiceMultiPortTypeTest");
SOAPServiceMultiPortTypeTest service = new SOAPServiceMultiPortTypeTest(wsdl, sname);
DocLitBare b = service.getDocLitBarePort();
updateAddressPort(b, PORT);
BareDocumentResponse resp = b.testDocLitBare("CXF");
assertNotNull(resp);
assertEquals("CXF", resp.getCompany());
Greeter g = service.getGreeterPort();
updateAddressPort(g, PORT);
String result = g.greetMe("CXF");
assertEquals("Hello CXF", result);
}
use of org.apache.hello_world_soap_http.DocLitBare in project cxf by apache.
the class DecoupledBareTest method testDecoupled.
@Test
public void testDecoupled() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
bus = bf.createBus("/org/apache/cxf/systest/ws/rm/decoupled_bare.xml");
BusFactory.setDefaultBus(bus);
SOAPServiceAddressingDocLitBare service = new SOAPServiceAddressingDocLitBare();
assertNotNull(service);
DocLitBare greeter = service.getSoapPort();
updateAddressPort(greeter, PORT);
((BindingProvider) greeter).getRequestContext().put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
ConnectionHelper.setKeepAliveConnection(greeter, true);
BareDocumentResponse bareres = greeter.testDocLitBare("MySimpleDocument");
assertNotNull("no response for operation testDocLitBare", bareres);
assertEquals("CXF", bareres.getCompany());
assertTrue(bareres.getId() == 1);
}
Aggregations