// Check to make sure that the SOAP Body and Timestamp were signed
DefaultCryptoCoverageChecker coverageChecker = new DefaultCryptoCoverageChecker();
GreeterService service = new GreeterService();
Greeter port = service.getGreeterPort();
org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);
client.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
client.getInInterceptors().add(new WSS4JInInterceptor(inProps));
client.getInInterceptors().add(coverageChecker);
String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
// make a sequence of 4 invocations
for (int i = 0; i < 4; i++) {
System.out.println("Invoking greetMe...");
String response = port.greetMe(names[i]);
System.out.println("response: " + response + "\n");
}
if (port instanceof Closeable) {
((Closeable)port).close();