You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mike Wallace <th...@yahoo.com> on 2006/07/21 00:48:04 UTC
CalendarDeserializer and empty dates
The XML message we're attempting to deserialize has
the following elements in it:
<assignedDate xsi:type="xsd:dateTime" />
<createdDate
xsi:type="xsd:dateTime">2006-07-19T18:23:46.327Z</createdDate>
The createDate element has no problems, but
assignedDate, which has no data, fails with the
following:
java.lang.NumberFormatException: Invalid date/time
Is this a known limitation of the Calendar deserializer?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: CalendarDeserializer and empty dates
Posted by Jeff Greif <je...@gmail.com>.
The empty string is not a valid xsd:dateTime.
To make this a valid response from your service, you would have to
specify in the schema that assignedDate was nillable and in the
respponse, <assignedDate xsi:nil="true" ...> . I don't know whether the
Calendar serializer would have to be able to handle it then -- probably not.
Another possibility is to make the assignedDate element optional in the
schema (minOccurs="0") and omit in the response when it has no value.
Jeff
Mike Wallace wrote:
> The XML message we're attempting to deserialize has
> the following elements in it:
> <assignedDate xsi:type="xsd:dateTime" />
> <createdDate
> xsi:type="xsd:dateTime">2006-07-19T18:23:46.327Z</createdDate>
>
> The createDate element has no problems, but
> assignedDate, which has no data, fails with the
> following:
>
> java.lang.NumberFormatException: Invalid date/time
>
> Is this a known limitation of the Calendar deserializer?
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org