You can add a Timestamp by changing: > properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
to properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN + " " + WSHandlerConstants.TIMESTAMP); See here for various other configuration options you can set: http://ws.apache.org/wss4j/config.html Colm. On Tue, May 8, 2012 at 8:56 AM, meteora28 <[email protected]> wrote: > If I set the following properties: > > properties.put(WSHandlerConstants.ACTION, > WSHandlerConstants.USERNAME_TOKEN); > properties.put(WSHandlerConstants.USER, "root"); > properties.put(WSHandlerConstants.PASSWORD_TYPE, ...); // e.g. DIGEST > properties.put(WSHandlerConstants.PW_CALLBACK_REF, new > WebServicePasswordHandler(this.password)); > > the following header will be created: > > <wsse:Security soap:mustUnderstand="true" > xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> > <wsse:UsernameToken wsu:Id="UsernameToken-2" > xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> > <wsse:Username>root</wsse:Username> > <wsse:Password > Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">D1wqjZzIPjIAkCDFeNgi1ybf1v0=</wsse:Password> > <wsse:Nonce > EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">0TZLYK++cvUbemELIuSc2w==</wsse:Nonce> > <wsu:Created>2012-05-08T07:30:49.402Z</wsu:Created> > </wsse:UsernameToken> > </wsse:Security> > > How can I change/set the timestamp? > > Thank you! > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/How-to-set-Timestamp-to-WS-Security-tp5692929.html > Sent from the cxf-user mailing list archive at Nabble.com. -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
