You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by George Voronoff <Ge...@grassroots.com> on 2002/02/06 03:30:10 UTC

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


RE: Serializing Date objects.

Posted by Chris Means <cm...@empowergeo.com>.
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:George.Voronoff@grassroots.com]
> Sent: Tuesday, February 05, 2002 8:30 PM
> To: soap-user@xml.apache.org
> 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
>


RE: Serializing Date objects.

Posted by Chris Means <cm...@empowergeo.com>.
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:George.Voronoff@grassroots.com]
> Sent: Tuesday, February 05, 2002 8:30 PM
> To: soap-user@xml.apache.org
> 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
>