Personalize
ADS

axis2c timestamp precision

Forums :

hi all,

how can I disable milliseconds precision when creating UsernameToken (<wsu:Created>2008-04-09T09:24:53.860Z</wsu:Created>)
 
. . .
 
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

            <wsse:Username>installer</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">9Pn0LjtvC3yXTysNHUspV2X33qY=</wsse:Password>

            <wsse:Nonce>WYO1N58WMll+AZ8TpQQqVcSxbCYOrH6+</wsse:Nonce>

            <wsu:Created>2008-04-09T09:24:53.860Z</wsu:Created>
 
. . .
 

I use rampart whit Policy-File.
 
Please help! It is urgent!!!
 

 
 

 

 

Can't control through policy file

Hi,

You might have to do a code modification (AFAIK you can't disable it using policy file). You can change it in rampart_username_token.c (method: rampart_username_token_build()). you can see the place where created_val is created (line 148). This is a string value, so you can modify it if you want.

May I know, why do you want to disable it?

Regards,
Shankar

I have a WS-Server created

I have a WS-Server created with .NET. My WS-Client doesn't work with milliseconds.

My Java Client (with axis2java) works fine, but only without milliseconds in UsernameToken.

At axis2java it is simply to change:

either

<precisionInMilliseconds>false</precisionInMilliseconds> into axis2.xml

or

stub._getServiceClient().getOptions().setProperty(WSHandlerConstants.TIMESTAMP_PRECISION, "false");

But I can not find how I can change is at asis2c!