[ 
https://issues.apache.org/jira/browse/AXIS2-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805555#action_12805555
 ] 

Balaje Krishnan commented on AXIS2-4594:
----------------------------------------

Hi,

Please find below the sample wsdl entries-

<xsd:element minOccurs="0" maxOccurs="1" name="Cust Name" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="Id" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="Description" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="BusinessType" type="xsd:string" 
/>
<xsd:element minOccurs="0" maxOccurs="1" name="Date" type="xsd:date" />

We compile this wsdl2java code to get auto generated axis2 objects. And we use 
adb data binding methods.

We wrote our own test client, to call these web services using stub.

We are setting the required data to axis2 objects and via stub we are calling 
the webservice.
-------------------------------------------------------------------------------------------------------------
Sample Code: - 

ServiceStub objStub = getStub();
SimpleDateFormat objDateFormat = new SimpleDateFormat("MM/dd/yyyy");
Date  objDate = null;
objDate = objDateFormat.parse("01/11/2010");
SearchRequest objSearch = new SearchRequest();
objSearch.setDate(objDate);
SearchResponse objRes = objStub.searchCust(objSearch)
--------------------------------------------------------------------------------------------------------------

Now, the date passed from test client is 01/11/2010 00:00:00 IST. 

The webserver is located at CST time zone and when this date value is read from 
the axis2 object at web server, it becomes 01/10/2010 12:30:00 CST.

Tried a lot of ways to solve this, nothing helped. Any comments regarding this 
issue would be a great help.

Thanks,
Krishh


> issues with date convertions
> ----------------------------
>
>                 Key: AXIS2-4594
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4594
>             Project: Axis2
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.5.1
>            Reporter: Balaje Krishnan
>            Priority: Minor
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Hi,
> I use axis2 objects (Axis 1.5.1) to call a particular service from a web 
> server. If i pass a date field (consider as a search filter), the date is 
> converted to the local time zone where the servers are located. (For Example: 
> if i pass the date as '12/27/2009', the date recieved by the server is 
> '12/26/2009'). Is that a bug or do i have to handle it in my code. I need the 
> servers to have the same date which i pass from any where around the globe. 
> Thanks in advance,
> Krishh

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to