The only problem with the default Date serializer in Apache-SOAP 2.2 is that even though the XML output indicates the timezone is GMT/UTC, it's actually encoded in the sessions local time.
Check out the archive of this list for some of my past comments on this. The most recent updates to Apache-SOAP have the "problem" fixed, but they've not been published yet, so use at your own risk. > -----Original Message----- > From: George Voronoff [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 05, 2002 8:30 PM > To: [EMAIL PROTECTED] > Subject: Serializing Date objects. > > > I just noticed the follwing in the faq at > http://xml.apache.org/soap/faq/faq_chawke.html#Q3_1 > > > 7.3 How do you serialize java.util.Date objects? > Use BeanSerializer. Either add a mapping for date in the > deployment xml file or call SOAPMappingRegistry.mapTypes() in > your application. A more "correct" DateSerializer is planned that > serializes using the ISO date format. > Date objects should be converted to xsd:date > (http://www.w3.org/TR/xmlschema-2/#date) or xsd:timeInstant > (http://www.w3.org/TR/xmlschema-2/#timeInstant) to be SOAP compliant. > The SOAP spec says, "For simple types, SOAP adopts all the types > found in the section Built-in datatypes of the XML Schema Part 2: > Datatypes", (http://www.w3.org/TR/SOAP/#_Toc478383514), but not > all have been implemented > > > This is out of date right? It looks like there is already a > DateSerializer in soap2_2. > If this *is* out of date, who should I email to have this updated? > I just used org.apache.soap.encoding.soapenc.DateSerializer to > serialize a date. It seemed to wokr just fine. > Is there any reason *not* to use DateSerializer? > > > > George Voronoff >