SecurityHeaderCacheInterceptor cacheInterceptor =
new SecurityHeaderCacheInterceptor();
cxfClient.getOutInterceptors().add(cacheInterceptor);
// Make two invocations with the same UsernameToken
utPort.doubleIt(25);
try {
utPort.doubleIt(25);
fail("Failure expected on a replayed UsernameToken");
} catch (javax.xml.ws.soap.SOAPFaultException ex) {
String error = "A replay attack has been detected";