axis2c timestamp precision

kletke's picture

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!!!
 
 
 

 

 

uthaiyashankar's picture

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
kletke's picture

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!
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)