cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mulpuri, Krishna Sai" <>
Subject RE: Unable to add Nonce and Created Timestamp in WS-security Headers
Date Tue, 18 Mar 2014 11:07:29 GMT
Found the issue. Sorry to bother you :)

From: Mulpuri, Krishna Sai
Sent: Tuesday, March 18, 2014 3:31 PM
To: ''
Subject: Unable to add Nonce and Created Timestamp in WS-security Headers

Hi Andrei,

I am having below code to set nonce and created timestamp in the ws-security headers.
outProps.put(WSHandlerConstants.ADD_USERNAMETOKEN_NONCE, WSConstants.NONCE_LN);
outProps.put(WSHandlerConstants.ADD_USERNAMETOKEN_CREATED, WSConstants.CREATED_LN);
client.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));

getting an exception saying invalid key "addUsernameTokenNonce" when I try to run the code
Mar 18, 2014 3:26:11 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for #{}Invoke has thrown exception,
unwinding now
org.apache.cxf.binding.soap.SoapFault: Security processing failed.
       at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
       at org.apache.cxf.endpoint.ClientImpl.doInvoke(
       at org.apache.cxf.endpoint.ClientImpl.invoke(
       at org.apache.cxf.endpoint.ClientImpl.invoke(
       at org.apache.cxf.endpoint.ClientImpl.invoke(
       at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(
       at org.apache.cxf.jaxws.DispatchImpl.invoke(
       at org.apache.cxf.jaxws.DispatchImpl.invoke(

Caused by: org.apache.wss4j.common.ext.WSSecurityException: WSHandler: illegal addUsernameTokenNonce
       at org.apache.wss4j.dom.handler.WSHandler.decodeBooleanConfigValue(
       at org.apache.wss4j.dom.handler.WSHandler.decodeUTParameter(
       at org.apache.wss4j.dom.handler.WSHandler.doSenderAction(
       ... 66 more

I am not sure whether this is a configuration issue or a bug.
Is there any other way to configure this ?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message