use of org.apache.hello_world_rpclit.SOAPServiceRPCLit in project cxf by apache.
the class ProviderRPCClientServerTest method testSOAPMessageModeRPC.
@Test
public void testSOAPMessageModeRPC() throws Exception {
QName serviceName = new QName("http://apache.org/hello_world_rpclit", "SOAPServiceProviderRPCLit");
QName portName = new QName("http://apache.org/hello_world_rpclit", "SoapPortProviderRPCLit1");
URL wsdl = getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl");
assertNotNull(wsdl);
SOAPServiceRPCLit service = new SOAPServiceRPCLit(wsdl, serviceName);
assertNotNull(service);
String response1 = new String("TestGreetMeResponseServerLogicalHandlerServerSOAPHandler");
String response2 = new String("TestSayHiResponse");
GreeterRPCLit greeter = service.getPort(portName, GreeterRPCLit.class);
updateAddressPort(greeter, PORT);
try {
String greeting = greeter.greetMe("Milestone-0");
assertNotNull("no response received from service", greeting);
assertEquals(response1, greeting);
} catch (Exception e) {
e.printStackTrace();
}
String reply = greeter.sayHi();
assertNotNull("no response received from service", reply);
assertEquals(response2, reply);
}
Aggregations