assertNotNull(service);
String response1 = new String("Hello Milestone-");
String response2 = new String("Bonjour");
try {
GreeterRPCLit greeter = service.getPort(portName, GreeterRPCLit.class);
ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
updateAddressPort(greeter, PORT);
for (int idx = 0; idx < 1; 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);
try {
greeter.greetMe("return null");
fail("should catch WebServiceException");
} catch (WebServiceException e) {
//do nothing
} catch (Exception e) {
fail("should catch WebServiceException");
throw e;
}
try {
greeter.greetMe(null);
fail("should catch WebServiceException");
} catch (WebServiceException e) {
//do nothing
} catch (Exception e) {
fail("should catch WebServiceException");