See the test-case attached to CXF-1970:
https://issues.apache.org/jira/browse/CXF-1970
In particular, the configuration on the outbound side:
msg.put(
WSHandlerConstants.ACTION,
WSHandlerConstants.USERNAME_TOKEN + " "
+ WSHandlerConstants.ENCRYPT
);
msg.put(WSHandlerConstants.ENC_PROP_FILE,
"META-INF/cxf/outsecurity.properties");
msg.put(WSHandlerConstants.USER, "alice");
msg.put("password", "alicePassword");
msg.put(WSHandlerConstants.ENCRYPTION_USER, "myalias");
msg.put(
WSHandlerConstants.ENCRYPTION_PARTS,
"{Content}{" + WSConstants.WSSE_NS + "}UsernameToken"
);
Colm.
-----Original Message-----
From: Lawrence Johnbosco [mailto:[email protected]]
Sent: 08 January 2009 19:40
To: [email protected]
Subject: WS-Security UsernameToken and WS-Security Encryption together
Hi,
Do any of you have a working sample that implements both the WS-Security
UsernameToken and WS-Security Encryption together? I'm trying with two
WSS4J
In and Out Interceptors - one for UsernameToken and the other for
WS-Security Encryption but ran into issues.
Thanks,
Lawrence