Hallo,
I have a strange problem with getting Calendar/Date (java.util.*) objects via an Axis/SOAP method. The method's return type is a complex type mapped as a bean with the beanMapping tag and this complex type has a Date field (I tried both Date and Calendar - neither worked).

When calling the method from the client, an exception is thrown upon deserialization:

org.xml.sax.SAXException: No object was found for class type class java.util.Calendar

This is even more strange, since I set up another test method that simply returns a Calendar (or Date - again I tried both) instance. This method works just fine so I really don't see how this is different from the previous bean-field case.

Just to summarize again:
case #1 - complex bean-mapped type with a field of the type java.util.Date or java.util.Calendar returned by the webservice method - the above-mentioned exception is thrown upon deserialization

case #2 - just java.util.Date or java.util.Calendar (Axis should handle ser/deser automatically - so no mapping or other black magic) returned by a webservice method - everything OK


PLUS I checked the request/response with the tcpmon utility and the Date/Calendar values are serialized the same way in both cases:

<date xsi:type="xsd:dateTime">2006-08-30T12:33:50.197Z</date>

I am 99% sure that the complex classes' beanMapping is correct - when I remove the Date field, the object gets from the server to the client with NO PROBLEMS.

I'll appreciate any help you can give me - I feel kind of silly to even ask this since the issue looks quite elementary, but it's just not working for me
some sources here:

public class CdrRecordSO implements Serializable { ... private Calendar date; // THIS IS THE FIELD THAT CAUSES PROBLEMS public Calendar getDate() { return this.date; } public void setDate(Calendar date) { this.date = date; } ... }

View this message in context: No object was found for class type class java.util.Calendar
Sent from the Axis - User forum at Nabble.com.

Reply via email to