if (test.isStreaming()) {
SecurityTestUtil.enableStreaming(port);
}
WSS4JStaxOutInterceptor staxOutInterceptor = null;
WSS4JOutInterceptor outInterceptor = null;
if (test.isStreaming()) {
staxOutInterceptor = new WSS4JStaxOutInterceptor(outProps);
bus.getOutInterceptors().add(staxOutInterceptor);
} else {
outInterceptor = new WSS4JOutInterceptor(outProps);
bus.getOutInterceptors().add(outInterceptor);
}
try {
port.doubleIt(25);
fail("Failure expected on not signing the WS-Addressing headers");
} catch (Exception ex) {
// expected
}
// Now sign the WS-Addressing headers
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;");
if (test.isStreaming()) {
bus.getOutInterceptors().remove(staxOutInterceptor);
SecurityTestUtil.enableStreaming(port);
} else {
bus.getOutInterceptors().remove(outInterceptor);
}
if (test.isStreaming()) {
staxOutInterceptor = new WSS4JStaxOutInterceptor(outProps);
bus.getOutInterceptors().add(staxOutInterceptor);
} else {
outInterceptor = new WSS4JOutInterceptor(outProps);
bus.getOutInterceptors().add(outInterceptor);
}