Re: 4.2.1 Simple Types (java.util.Date)

From: ow <oneway_111_at_YAHOO.COM>
Date: Fri, 30 May 2003 15:59:31 -0700

--- Doug Kohlert <Doug.Kohlert_at_SUN.COM> wrote:
> Ow,
> The reason this mapping exists is because xsd:dateTime contains both date
> and time. If the mapping were use java.util.Date, the time would be lost
> for applications that require the time.
> If you notice in section 5.3.2, that both Date and Calendar are mapped
> to xsd:dateTime. Thus if you write an application in Java that uses
> Date, it will transfer that Date as xsi:dateTime. However, as you have
> noted, because of the mapping in 4.2.1, clients generated from the WSDL will
> use Calendar, not Date.
> I hope this clarifies things for you.

Thanks for the response. I'm still unclear though why the time would be lost if
java.util.Date was used. It does contain the number of milliseconds since
01/01/1970, so the time could be easily calculated. Or do you mean the time
cannot be calculated without converting to Calendar?


Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).