use of org.apache.hello_world_soap_http.SOAPServiceTest1 in project cxf by apache.
the class JSClientServerTest method testJSPayloadMode.
@Test
public void testJSPayloadMode() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
assertNotNull(wsdl);
QName serviceName = new QName(NS, "SOAPService_Test1");
QName portName = new QName(NS, "SoapPort_Test1");
SOAPServiceTest1 service = new SOAPServiceTest1(wsdl, serviceName);
assertNotNull(service);
String response1 = new String("TestGreetMeResponse");
String response2 = new String("TestSayHiResponse");
try {
Greeter greeter = service.getPort(portName, Greeter.class);
updateAddressPort(greeter, JSX_PORT);
String greeting = greeter.greetMe("TestGreetMeRequest");
assertNotNull("no response received from service", greeting);
assertEquals(response1, greeting);
String reply = greeter.sayHi();
assertNotNull("no response received from service", reply);
assertEquals(response2, reply);
} catch (UndeclaredThrowableException ex) {
ex.printStackTrace();
throw (Exception) ex.getCause();
}
}
Aggregations