1 Reply Latest reply on Sep 12, 2004 7:13 PM by Thomas Diesler

    Can not deserialize complex types

    iamapony Newbie

      Okay, I feel like I'm taking crazy pills here. I've been over and over this and I can't seem to find a solution. I'm trying to expose a SessionBean method as a web service that returns a Vector of java objects. Here's the generated web-services.xml.

      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions targetNamespace="http://localhost:8080/jboss-net/services/notificationServices" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/jboss-net/services/notificationServices" xmlns:intf="http://localhost:8080/jboss-net/services/notificationServices" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://net.jboss.org/jmx" xmlns:tns2="http://www.creeksystems.com/webServices" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:types><schema targetNamespace="http://net.jboss.org/jmx" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><simpleType name="ObjectNameType"><simpleContent><extension base="xsd:string"/></simpleContent></simpleType></schema><schema targetNamespace="http://www.creeksystems.com/webServices" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="RemoteLocationEvent"><sequence><element name="batteryLow" type="xsd:boolean"/><element name="eventDesc" nillable="true" type="xsd:string"/><element name="eventTime" nillable="true" type="xsd:dateTime"/><element name="tagId" nillable="true" type="xsd:string"/><element name="tampered" type="xsd:boolean"/></sequence></complexType><complexType name="RemoteLocationRecord"><sequence><element name="checkPointTime" nillable="true" type="xsd:dateTime"/><element name="locationId" nillable="true" type="xsd:string"/><element name="remoteLocationEvents" nillable="true" type="apachesoap:Vector"/></sequence></complexType><complexType name="RemoteNotificationListener"><sequence><element name="groupIp" nillable="true" type="xsd:string"/><element name="locationId" nillable="true" type="xsd:string"/></sequence></complexType></schema><schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="Vector"><sequence><element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:anyType"/></sequence></complexType></schema></wsdl:types>
       <wsdl:message name="getNotificationListenersResponse">
       <wsdl:part name="gNotificationListeners" type="apachesoap:Vector"/>
       </wsdl:message>
       <wsdl:message name="getNotificationListenersRequest">
       </wsdl:message>
       <wsdl:portType name="NotificationManager">
       <wsdl:operation name="getNotificationListeners">
       <wsdl:input message="impl:getNotificationListenersRequest" name="getNotificationListenersRequest"/>
       <wsdl:output message="impl:getNotificationListenersResponse" name="getNotificationListenersResponse"/>
       </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="notificationServicesSoapBinding" type="impl:NotificationManager">
       <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
       <wsdl:operation name="getNotificationListeners">
       <wsdlsoap:operation soapAction="notificationServices"/>
       <wsdl:input name="getNotificationListenersRequest">
       <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/jboss-net/services/notificationServices" use="encoded"/>
       </wsdl:input>
       <wsdl:output name="getNotificationListenersResponse">
       <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/jboss-net/services/notificationServices" use="encoded"/>
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="NotificationManagerService">
       <wsdl:port binding="impl:notificationServicesSoapBinding" name="notificationServices">
       <wsdlsoap:address location="http://localhost:8080/jboss-net/services/notificationServices"/>
       </wsdl:port>
       </wsdl:service>
      </wsdl:definitions>
      



      I use Wsdl2Java to generate the client, if I execute the code and get Zero results it works fine, but when there are results in the Vector returned I get the following error message.

      Sep 2, 2004 5:42:54 PM org.apache.axis.client.Call invoke
      SEVERE: Exception:
      org.xml.sax.SAXException: No deserializer for {http://www.creeksystems.com/webServices}RemoteNotificationListener
       at org.apache.axis.encoding.DeserializerImpl.onStartElement(DeserializerImpl.java:485)
       at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:428)
       at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
       at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
       at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
       at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:404)
       at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
       at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
       at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
       at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:404)
       at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
       at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
       at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
       at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:323)
       at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
       at org.apache.axis.client.Call.invoke(Call.java:2272)
       at org.apache.axis.client.Call.invoke(Call.java:2171)
       at org.apache.axis.client.Call.invoke(Call.java:1691)
       at localhost.jboss_net.services.notificationServices.NotificationServicesSoapBindingStub.getNotificationListeners(NotificationServicesSoapBindingStub.java:96)
       at com.creeksystems.services.ServiceAdaptor.initGroupSubscriptions(ServiceAdaptor.java:36)
       at com.creeksystems.ui.Client.doIt(Client.java:84)
       at com.creeksystems.ui.Client.main(Client.java:49)
      AxisFault
       faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
       faultSubcode:
       faultString: org.xml.sax.SAXException: No deserializer for {http://www.creeksystems.com/webServices}RemoteNotificationListener
       faultActor:
       faultNode:
       faultDetail:
       {http://xml.apache.org/axis/}stackTrace: org.xml.sax.SAXException: No deserializer for {http://www.creeksystems.com/webServices}RemoteNotificationListener
       at org.apache.axis.encoding.DeserializerImpl.onStartElement(DeserializerImpl.java:485)
       at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:428)
       at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
       at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
       at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
       at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:404)
       at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
       at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
       at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
       at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:404)
       at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
       at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
       at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
       at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:323)
       at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
       at org.apache.axis.client.Call.invoke(Call.java:2272)
       at org.apache.axis.client.Call.invoke(Call.java:2171)
       at org.apache.axis.client.Call.invoke(Call.java:1691)
       at localhost.jboss_net.services.notificationServices.NotificationServicesSoapBindingStub.getNotificationListeners(NotificationServicesSoapBindingStub.java:96)
       at com.creeksystems.services.ServiceAdaptor.initGroupSubscriptions(ServiceAdaptor.java:36)
       at com.creeksystems.ui.Client.doIt(Client.java:84)
       at com.creeksystems.ui.Client.main(Client.java:49)


      Any help would be GREATLY appreciated.


      THANKS!!!