outProps.put("signatureParts",
"{}{http://schemas.xmlsoap.org/soap/envelope/}Body;"
+ "{}{http://docs.oasis-open.org/wss/2004/01/oasis-"
+ "200401-wss-wssecurity-utility-1.0.xsd}Timestamp;");
WSS4JOutInterceptor wss4jOutInterceptor = new WSS4JOutInterceptor(outProps);
bus.getOutInterceptors().add(wss4jOutInterceptor);
try {
port.doubleIt(25);
fail("Failure expected on not signing the WS-Addressing headers");
} catch (Exception ex) {
// expected
}
// Now sign the WS-Addressing headers
bus.getOutInterceptors().remove(wss4jOutInterceptor);
outProps.put("signatureParts",
"{}{http://schemas.xmlsoap.org/soap/envelope/}Body;"
+ "{}{http://docs.oasis-open.org/wss/2004/01/oasis-"
+ "200401-wss-wssecurity-utility-1.0.xsd}Timestamp;"
+ "{}{http://www.w3.org/2005/08/addressing}ReplyTo;");
wss4jOutInterceptor = new WSS4JOutInterceptor(outProps);
bus.getOutInterceptors().add(wss4jOutInterceptor);
port.doubleIt(25);
((java.io.Closeable)port).close();