5 Replies Latest reply on Aug 4, 2005 9:11 AM by Christy Christy

    Deserializing parameter error

    Jose Luis Lopez Newbie

      Hello,

      I have a deployed web service but when the client tries to use it, a server deserializing parameter error is shown:

      11:47:10,715 ERROR [RPCInvocation] org.xml.sax.SAXException: Deserializing parameter 'sayHello': could not find deserializer for type {urn:Foo}sayHello
      org.xml.sax.SAXException: Deserializing parameter 'sayHello': could not find deserializer for type {urn:Foo}sayHello
       at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:329)
       at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1186)
       at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
       at org.apache.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1406)
       at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:262)
       at org.apache.axis.message.RPCElement.getParams(RPCElement.java:396)
      (...)
      


      My wsdl file is (the piece involved in the operation sayHello):
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name="MyHelloService" targetNamespace="http://DefaultNamespace" xmlns:tns="http://DefaultNamespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="urn:Foo" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
       <types>
       <schema targetNamespace="urn:Foo" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:Foo" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <complexType name="sayHello">
       <sequence>
       <element name="String_1" nillable="true" type="string"/></sequence></complexType>
       <complexType name="sayHelloResponse">
       <sequence>
       <element name="result" nillable="true" type="string"/></sequence></complexType>
       <element name="sayHello" type="tns:sayHello"/>
       <element name="sayHelloResponse" type="tns:sayHelloResponse"/>
       </schema>
       </types>
       <message name="HelloIF_sayHello">
       <part name="parameters" element="ns2:sayHello"/>
       </message>
       <message name="HelloIF_sayHelloResponse">
       <part name="result" element="ns2:sayHelloResponse"/>
       </message>
       <portType name="HelloIF">
       <operation name="sayHello">
       <input message="tns:HelloIF_sayHello"/>
       <output message="tns:HelloIF_sayHelloResponse"/>
       </operation>
       </portType>
       <binding name="HelloIFBinding" type="tns:HelloIF">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="sayHello">
       <soap:operation soapAction=""/>
       <input>
       <soap:body use="literal"/>
       </input>
       <output>
       <soap:body use="literal"/>
       </output>
       </operation>
       </binding>
       <service name="MyHelloService">
       <port name="HelloIFPort" binding="tns:HelloIFBinding">
       <soap:address location="http://localhost:8080/HelloService/JoseluService"/>
       </port>
       </service>
      </definitions>
      


      I am using document literal encoding (wscompile tool).

      The input & output parameters are String type. Why cannot it be deserialized using the default deserializer?
      Please, I would also known which (de)serializer could the the most suitable.

      Thanks in advance


        • 1. Re: Deserializing parameter error
          Jason Greene Master

          Did you also generate a jaxrpc-mapping.xml file?

          • 2. Re: Deserializing parameter error
            Jose Luis Lopez Newbie

            Hi,

            Sure!. It is:

            <?xml version="1.0" encoding="UTF-8"?>
            <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
            <package-mapping>
             <package-type>helloservice3Web</package-type>
             <namespaceURI>urn:Foo</namespaceURI>
            </package-mapping>
            <package-mapping>
            <package-type>helloservice3Web</package-type>
            <namespaceURI>http://DefaultNamespace</namespaceURI>
            </package-mapping>
            
            <java-xml-type-mapping>
            <java-type>helloservice3Web.HelloIF_sayHello_RequestStruct</java- type>
            <root-type-qname xmlns:typeNS="urn:Foo">typeNS:sayHello</root-type-qname>
            <qname-scope>complexType</qname-scope>
            <variable-mapping>
            <java-variable-name>String_1</java-variable-name>
            <xml-element-name>String_1</xml-element-name>
            </variable-mapping>
            </java-xml-type-mapping>
            
            <java-xml-type-mapping>
            <java-type>helloservice3Web.HelloIF_sayHello_ResponseStruct</java-type>
            <root-type-qname xmlns:typeNS="urn:Foo">typeNS:sayHelloResponse</root-type-qname>
            <qname-scope>complexType</qname-scope>
            <variable-mapping>
            <java-variable-name>result</java-variable-name>
            <xml-element-name>result</xml-element-name>
            </variable-mapping>
            </java-xml-type-mapping>
            
            <service-interface-mapping>
            <service-interface>helloservice3Web.MyHelloService</service-interface>
            <wsdl-service-name xmlns:serviceNS="http://DefaultNamespace">serviceNS:MyHelloService</wsdl-service-name>
            <port-mapping>
            <port-name>HelloIFPort</port-name>
            <java-port-name>HelloIFPort</java-port-name>
            </port-mapping>
            
            </service-interface-mapping>
            <service-endpoint-interface-mapping>
            <service-endpoint-interface>helloservice3Web.HelloIF</service-endpoint-interface>
            <wsdl-port-type xmlns:portTypeNS="http://DefaultNamespace">portTypeNS:HelloIF</wsdl-port-type>
            <wsdl-binding xmlns:bindingNS="http://DefaultNamespace">bindingNS:HelloIFBinding</wsdl-binding>
            
            <service-endpoint-method-mapping>
            <java-method-name>sayHello</java-method-name>
            <wsdl-operation>sayHello</wsdl-operation>
            <wrapped-element/>
            <method-param-parts-mapping>
            <param-position>0</param-position>
            <param-type>java.lang.String</param-type>
            <wsdl-message-mapping>
            <wsdl-message xmlns:wsdlMsgNS="http://DefaultNamespace">wsdlMsgNS:HelloIF_sayHello</wsdl-message>
            <wsdl-message-part-name>String_1</wsdl-message-part-name>
            <parameter-mode>IN</parameter-mode>
            </wsdl-message-mapping>
            </method-param-parts-mapping>
            <wsdl-return-value-mapping>
            <method-return-value>java.lang.String</method-return-value>
            <wsdl-message xmlns:wsdlMsgNS="http://DefaultNamespace">wsdlMsgNS:HelloIF_sayHelloResponse</wsdl-message>
            <wsdl-message-part-name>result</wsdl-message-part-name>
            </wsdl-return-value-mapping>
            
            </service-endpoint-method-mapping>
            
            </service-endpoint-interface-mapping>
            
            </java-wsdl-mapping>
            



            Thanks.


            • 3. Re: Deserializing parameter error
              Joel Espinosa Newbie

              Hi, I have exactly the same problem as you, anybody how help us??

              Thanks in advance.

              JAEC

              • 4. Re: Deserializing parameter error
                Thomas Diesler Master

                What jboss version is this? It looks ok to me.

                Could you try if this still shows with this WS4EE that is expected go out with jboss-4.0.3

                cvs co -r Branch_4_0 jboss-4.0.x
                


                If yes please file a JIRA issue as explained in
                http://www.jboss.org/index.html?module=bb&op=viewtopic&t=62678

                • 5. Re: Deserializing parameter error
                  Christy Christy Novice

                  Hi, I have the same problem but I have another type, bean class.
                  In one project (using IDEA) it's working well,
                  but in another ptoject, where datatype class is located I'm getting this error! I had tried to move libs, but nothing. Why using external import I'm not getting this error?