Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, address);
BookWorld bwService = service.getPort(BookWorld.class);
BookWithValidation bw = bwService.echoBook(new BookWithValidation("WS", "123"));
assertEquals("123", bw.getId());
try {
bwService.echoBook(new BookWithValidation(null, "123"));
fail("Validation failure expected");
} catch (SOAPFaultException ex) {
// complete
}
}