axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Robison <drrobi...@openroadsconsulting.com>
Subject Problems deserializing java.util.Calendar objects
Date Mon, 08 Nov 2004 18:11:59 GMT
I have an xml type the returns (as one of its elements) a xsd:dateTime 
field which is translated to a java.util.Calendar object in the java 
code. When I try to call the axis service that returns the type 
containing the xsd:dateTime field, I get the following error:

SOAP1: org.xml.sax.SAXException: Unregistered type:  class 
java.util.Calendar
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXException: Unregistered type:  class 
java.util.Calendar
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: 
Unregistered type:  class java.util.Calendar
    at 
org.apache.axis.encoding.ser.BeanDeserializer.onStartElement(BeanDeserializer.java:383)
    at 
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:395)
    at 
org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:130)
    at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1038)
    at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:159)
    at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:845)
    at 
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:371)
    at 
org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:130)
    at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1038)
    at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:159)
    at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:845)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:198)
    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:323)
    at org.apache.axis.client.Call.invoke(Call.java:2418)
    at org.apache.axis.client.Call.invoke(Call.java:2317)
    at org.apache.axis.client.Call.invoke(Call.java:1774)
    at 
com.orci.MIMOSA.wsdl.reg.MIMOSARegSOAPBindingStub.querySiteDatabase(MIMOSARegSOAPBindingStub.java:209)
    at com.orci.OpenIMACCS.demo.soap.SimpleClient.main(SimpleClient.java:49)

    {http://xml.apache.org/axis/}hostname:KC7BFI

org.xml.sax.SAXException: Unregistered type:  class java.util.Calendar
    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
    at org.apache.axis.client.Call.invoke(Call.java:2421)
    at org.apache.axis.client.Call.invoke(Call.java:2317)
    at org.apache.axis.client.Call.invoke(Call.java:1774)
    at 
com.orci.MIMOSA.wsdl.reg.MIMOSARegSOAPBindingStub.querySiteDatabase(MIMOSARegSOAPBindingStub.java:209)
    at com.orci.OpenIMACCS.demo.soap.SimpleClient.main(SimpleClient.java:49)
Caused by: org.xml.sax.SAXException: Unregistered type:  class 
java.util.Calendar
    at 
org.apache.axis.encoding.ser.BeanDeserializer.onStartElement(BeanDeserializer.java:383)
    at 
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:395)
    at 
org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:130)
    at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1038)
    at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:159)
    at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:845)
    at 
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:371)
    at 
org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:130)
    at 
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1038)
    at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:159)
    at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:845)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:198)
    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:323)
    at org.apache.axis.client.Call.invoke(Call.java:2418)Done
    ... 4 more

I've tied putting a type mapping in my wsdd as follows:

      <typeMapping
        xmlns:ns="http://www.mimosa.org/TechXMLV3-0"
        qname="ns:dateTimeWithoutTimezone"
        type="java:java.util.Calendar"
        serializer="org.apache.axis.encoding.ser.CalendarSerializerFactory"
        
deserializer="org.apache.axis.encoding.ser.CalendarDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />

but this does not seem to help.


Any ideas what the problem might be?

Thanks in advance,
David Robison

-- 

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@openroadsconsulting.com
web: http://openroadsconsulting.com



Mime
View raw message