4
votes

I´m using axis 1.4 to retrieve information from a (server) webservice.

My WSDL have the following information:

< xs:element name="ABC">

< xs:complexType>

< xs:sequence>

< xs:element name="DEF">

< xs:complexType>

< xs:sequence>

< xs:element name="Data" type="xs:dateTime"/>

I have generated the stubs which origins the following code:

@XmlElement(name = "Data", required = true)

@XmlSchemaType(name = "dateTime" )

protected XMLGregorianCalendar data;

When i make a call to this webservice i get the following error.

My current request is:

2003-10-27T10:10:10.000Z

Note that i already try using different formats for date (i allways get the same error).

Supposedly, this is the corret format due the CalendarDeserializer [SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")].

Any help? Thanks :)

P.S- Sorry about the text formatation (i was getting crazy with the message "Your post appears to contain code that is not properly formatted as code. ")

The error is: java.lang.NumberFormatException: Invalid date/time org.apache.axis.encoding.ser.CalendarDeserializer.makeValue(CalendarDeserializer.java:64)

1
Caused by: java.lang.NumberFormatException: Invalid date/time org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:180) org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502) org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) java.lang.NumberFormatException: Invalid date/time 18:02:03,782 ERROR org.apache.axis.encoding.ser.CalendarDeserializer.makeValue(CalendarDeserializer.java:64) org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:172) - JMarques
Note these problem doesn´t occurs on axis 2 (1.6.1). - JMarques

1 Answers

1
votes

and 8 years later.... I was facing a similar issue with axis 1.3. I was able to consume the webservice by using this format "2020-01-09T17:00:00.000-03:00".

A bit late but may help others