• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic