File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't deserialize xsd:date attributes using Axis WSDL2Java classes

 
Rafal Mrozik
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I am generating client classes from a WSDL with the Axis WSDL2Java tool.
Many of the attributes of the complexType objects described in the wsdl are xsd ate attributes. I can call some of the methods successfully, but when I call a method that returns an object that has an attribute which maps to an xsd ate attribute from the wsdl, the client fails with a deserialization error.

Axis version: 1.4
Java version: 1.4.2_08
server: WAS 5.1.1.11



The problem (I think) is with attribute type type="xsd ateTime"

There are two interesting thing:
1.
For data 2008-04-21T08:08:54.925Z I have no error
But for data 2008-05-22T01:00:00+01:00 or 2008-04-18T00:00:00.000+02:00 I have this error

2. If the data is the problem so why in stack trace is no org.apache.axis.encoding.ser.DateDeserializer

Thanks
rafal
 
Faraz Masood
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
same had happened with me !!

the problem is WSDL2Java converts xsd : dateTime as Java calendar object , and if you are not receiving the complete dateTime stream then you will receive this error.

in my case i made a change in wsdl locally , by converting dateTime to date ( because I was sure that my data will always look like a date and not dateTime) and this worked for me .

you may want to try something similar
 
Rafal Mrozik
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Faraz Masood, thanks for Your replay.

Unfortunately I need date with time zone information, soo I can't changing wsdl locally
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic