use of org.apache.cxf.hello_world_jms.HWByteMsgService in project cxf by apache.
the class JMSClientServerTest method testByteMessage.
@Test
public void testByteMessage() throws Exception {
QName serviceName = new QName("http://cxf.apache.org/hello_world_jms", "HWByteMsgService");
URL wsdl = getWSDLURL("/wsdl/jms_test.wsdl");
HWByteMsgService service = new HWByteMsgService(wsdl, serviceName);
String response1 = new String("Hello Milestone-");
String response2 = new String("Bonjour");
HelloWorldPortType greeter = service.getHWSByteMsgPort();
for (int idx = 0; idx < 2; idx++) {
String greeting = greeter.greetMe("Milestone-" + idx);
assertNotNull("no response received from service", greeting);
String exResponse = response1 + idx;
assertEquals(exResponse, greeting);
String reply = greeter.sayHi();
assertNotNull("no response received from service", reply);
assertEquals(response2, reply);
}
((java.io.Closeable) greeter).close();
}
Aggregations