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 Jan Heise <ja...@jamaris.com> on 2005/02/21 18:17:06 UTC

problems with xsd:date (client/server act different)

Hi all,

I have a problem with Axis1.2RC2.1 & xsd:date.
The Server is Axis and the Client is generated by wsdl2java.

The following snippet is from the wsdl. I have a complex object that has
this mapped attribute:

                     <xsd:element name="billDate" nillable="true"  
type="xsd:date"/>

When I send a message to the server I get the following exception:

AxisFault
  faultCode:  
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
  faultSubcode:
  faultString: java.lang.NumberFormatException: Invalid date/time
  faultActor:
  faultNode:
  faultDetail:
          
{http://xml.apache.org/axis/}stackTrace: 
java.lang.NumberFormatException: Invalid date/time
         at  
org.apache.axis.encoding.ser.CalendarDeserializer.makeValue(CalendarDese 
rializer.java:75)
         at  
org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeser 
ializer.java:170)
         at  
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.ja 
va:502)

Which clearly indicates that axis tries to use the CalendarDeserializer  
instead of
the DateDeserializer.

On the client side, the date is encoded like I expected it:  
<billDate>2004-12-14</billDate>
(from the stream) Why does axis try to decode it as "Calendar" - it is  
not xsd:dateTime?

I have no idea what to do...

Jan