According to the XML Schema 1.1 spec, the date datatype does not contain a
time value:

3.2.9.1 Lexical representation

The lexical representation for date is the reduced (right truncated) lexical
representation for dateTime: CCYY-MM-DD. No left truncation is allowed. An
optional following time zone qualifier is allowed as for dateTime. To
accommodate year values outside the range from 0001 to 9999, additional
digits can be added to the left of this representation and a preceding "-"
sign is allowed.

For example, to indicate May the 31st, 1999, one would write: 1999-05-31.
See also ISO 8601 Date and Time Formats (�D).

So I believe that the marshaling of dates with the CalenderSerializer is
incorrect. There is a DateSerializer that does the right thing, but it is
not being called. It seems like all java.util.Date objects are being
serialized by the CalenderSerializer regardless of the xml schema type that
is mapped to it. This strikes me as a bug.

Whitney

-----Original Message-----
From: Jeyakumaran.C [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 8:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Date serializer


hi,
As far as I concern, the formate u given for date is correct and axis should
accept it.So the problem may be in yr request or somewhere else.What the
exact fault messge u receive?.
Axis uses calender serializer and deserializer enough comprehensive to yr
date format.
Regards,
Jeyakumara.C
----- Original Message -----
From: "Whitney Hunter" <[EMAIL PROTECTED]>
To: "Axis User" <[EMAIL PROTECTED]>
Sent: Wednesday, August 20, 2003 3:06 AM
Subject: Date serializer


> Hi all,
>
> I have an XML schema type that looks like this:
>
> <complexType name="DemandBidType">
>   <sequence>
>      <element name="DemandBidHourly" minOccurs="0" maxOccurs="25">
>         <complexType>
>            <sequence>
>               <element name="FixedDemand" type="mkt:MWType"
> minOccurs="0" maxOccurs="1"/>
>               <element name="PriceSensitiveDemand"
> type="mkt:BlockBidType" minOccurs="0" maxOccurs="1"/>
>            </sequence>
>            <attributeGroup ref="mkt:HourEndingGroup"/>
>         </complexType>
>      </element>
>   </sequence>
>   <attribute name="day" type="date" use="required"/>
>   <attribute name="location" type="mkt:LocationNameType" use="required"/>
> </complexType>
>
> When I populate the "day" and "location" attributes and them submit it
> to my service, tcpmonitor is showing:
>
>    <DemandBid day="2003-08-19T17:35:16.859Z" location="test"/>
>
> This is fouling up my deserializer on the server (castor) because it
> does not expect the xml schema type "date" to have a time component.
> After looking at the Axis code for a while, it seems like it is using
> the CalendarSerializer instead of the DateSerializer. I don't know
> enough about Axis yet to know why. Can anyone help?
>
> Thanks,
> Whitney
>



Reply via email to