Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 1757 invoked from network); 15 Feb 2007 18:00:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Feb 2007 18:00:01 -0000 Received: (qmail 23228 invoked by uid 500); 15 Feb 2007 17:59:59 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 23209 invoked by uid 500); 15 Feb 2007 17:59:59 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 23197 invoked by uid 99); 15 Feb 2007 17:59:59 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Feb 2007 09:59:59 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [144.243.4.69] (HELO EXANPCN4.arinc.com) (144.243.4.69) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Feb 2007 09:59:45 -0800 Received: from ANPCN1.arinc.com (unverified [144.243.79.41]) by EXANPCN4.arinc.com (Content Technologies SMTPRS 4.3.19) with ESMTP id for ; Thu, 15 Feb 2007 12:59:20 -0500 Received: from TULMB1.arinc.com ([208.110.10.19]) by ANPCN1.arinc.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 15 Feb 2007 12:58:54 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7512A.F42F36B8" Subject: TimeZone Not Handled Properly In java.util.Date Conversions Date: Thu, 15 Feb 2007 11:59:11 -0600 Message-ID: <7EBAA5645357BF4ABC598F7357481A840112FA7E@TULMB1.arinc.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: TimeZone Not Handled Properly In java.util.Date Conversions Thread-Index: AcdRKv8XjfV9MiFkRJCQdPPE/T1kuQ== From: "Johnson, Larry D \(LJOHNSON\)" To: X-OriginalArrivalTime: 15 Feb 2007 17:58:54.0150 (UTC) FILETIME=[F4D62660:01C7512A] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C7512A.F42F36B8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable It seems the conversions of the java.util.Date class are not being handled properly. I have defined a server return value of a java.util.Date. The WSDL automatically generated for that value is as follows: =20 =20 The client stub is generated using the provided WSDL2Java. The client stub returns a java.util.Calendar object for this value. So far all is well. The problem comes in when you start looking into the handling of the TimeZone from server to client. Lets say both client and server are within the "Central Standard Time" zone. When the server provides the Date object to the POJO interface, the time is "1970-01-01T23:55:00.000". Axis2 then converts that time to a GMT time. The SOAP message contains "1970-01-02T05:55:00.000Z". Again all is well. When the client gets the Calendar object from the stub classes, the value is: 01/02/1970 11:55:00 Greenwich Mean Time. The time value is incorrect for the TimeZone indicate; however, it is correct for the local TimeZone. =20 The client simply performs the following: =20 responeData.getDepartureTime(); =20 Am I missing something here? Should the returned Calendar either keep the time consistent with GMT or convert the time to local time while changing the TimeZone to indicate the local TimeZone? =20 Regards, Larry Johnson ------_=_NextPart_001_01C7512A.F42F36B8 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

It seems = the conversions of the java.util.Date class are not being handled properly.  I have defined a server return value of a java.util.Date.  The WSDL = automatically generated for that value is as follows:

 

  = <xs:element name=3D"departureTime" = type=3D"xs:dateTime"/>

 

The = client stub is generated using the provided WSDL2Java.  The client stub returns = a java.util.Calendar object for this value.  So far all is = well.  The problem comes in when you start looking into the handling of the = TimeZone from server to client.  Lets say both client and server are within the = “Central Standard Time” zone.  When the server provides the Date = object to the POJO interface, the time is “1970-01-01T23:55:00.000”. =  Axis2 then converts that time to a GMT time.  The SOAP message contains = “1970-01-02T05:55:00.000Z”.  Again all is well.  When the client gets the Calendar object from = the stub classes, the value is: 01/02/1970 11:55:00 Greenwich Mean Time.  The time = value is incorrect for the TimeZone indicate; however, it is correct for the = local TimeZone.

 

The = client simply performs the following:

 

    responeData.getDepartureTime();

 

Am I = missing something here?  Should the returned Calendar either keep the time consistent with GMT or convert the time to local time while changing the TimeZone to indicate the local TimeZone?

 

Regards,

Larry = Johnson

------_=_NextPart_001_01C7512A.F42F36B8--