11 Replies Latest reply on Jan 4, 2006 10:39 AM by Thomas Diesler

    Could not find deserializer for type

    Alexander Meisinger Newbie

      Hi,

      I have created a webservice and deployed it on jboss. The webservice has three different methods.

      Testing the business-methods: sayHello is OK, meetAnimal is not OK, createAnimal is not OK, too.

      Any ideas what's going wrong?

      How can I prevent: could not find deserializer and No serializer found for class?

      String meetAnimal(Animal) delivers the following error message:

      AxisFault
       faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
       faultSubcode:
       faultString: Deserializing parameter 'in0': could not find deserializer for type {http://Hello}Animal
       faultActor:
       faultNode:
       faultDetail:
       {http://xml.apache.org/axis/}stackTrace:AxisFault
       faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
       faultSubcode:
       faultString: Deserializing parameter 'in0': could not find deserializer for type {http://Hello}Animal
       faultActor:
       faultNode:
       faultDetail:
      
      Deserializing parameter 'in0': could not find deserializer for type {http://Hello}Animal
       at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:262)
       at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)


      Animal createAnimal(ing, String) delivers following error message:
      AxisFault
       faultCode: {http://xml.apache.org/axis/}HTTP
       faultSubcode:
       faultString: (500)Internal Server Error
       faultActor:
       faultNode:
       faultDetail:
       {}:return code: 500
      [...]
      The server encountered an internal error () that prevented it from
      fulfilling this request.</u></p><p><b>exception</b>
      <pre>org.jboss.axis.AxisFault: No serializer found for class
      tutorial.interfaces.Animal in registry
      org.jboss.axis.encoding.TypeMappingImpl@adf91
       org.jboss.axis.AxisFault.makeFault(AxisFault.java:99)
       org.jboss.axis.MessagePart.writeTo(MessagePart.java:303)
       org.jboss.axis.MessagePart.getAsString(MessagePart.java:591)
       org.jboss.axis.MessagePart.getAsBytes(MessagePart.java:447)
       org.jboss.axis.Message.getContentType(Message.java:471)
       org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:971)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      </pre></p><p><b>note</b> <u>The full stack trace of the root cause
      is available in the Apache Tomcat/5.5.9 logs.</u></p><HR size="1"
      noshade="noshade"><h3>Apache Tomcat/5.5.9</h3></body></html>
       {http://xml.apache.org/axis/}HttpErrorCode:500
      



      My test-client:
      package tutorial.testing;
      import java.net.URL;
      import javax.xml.namespace.QName;
      import javax.xml.rpc.Service;
      import javax.xml.rpc.ServiceFactory;
      
      public class WSClient {
       public static void main(String[] args) throws Exception {
       URL url = new URL("http://ga_server:8080/TutorialCustom/TutorialHelloEndpoint?wsdl");
       QName qname = new QName("http://Hello", "TutorialHelloEndpointService");
       ServiceFactory factory = ServiceFactory.newInstance();
       Service service = factory.createService(url, qname);
       TutorialHelloEndpoint endpoint = (TutorialHelloEndpoint) service.getPort(TutorialHelloEndpoint.class);
      
       // testing business-method: String sayHello(String)
       String sayHelloVal = endpoint.sayHello("Wuff");
       System.out.println(sayHelloVal);
      
       // testing business-method: String meetAnimal(Animal)
       Animal myDog = new Animal();
       myDog.setAge(10);
       myDog.setName("Goofy");
       String meetAnimalVal = endpoint.meetAnimal(myDog);
       System.out.println(meetAnimalVal);
      
       // testing business-method: Animal createAnimal(int, String)
       Animal yourDog = endpoint.createAnimal(12,"Lassie");
       System.out.println("Your dog " + yourDog.getName() + " is " + yourDog.getAge() + " years old.");
       }
      }


      /**
       * TutorialHelloEndpoint.java
       *
       * This file was auto-generated from WSDL
       * by the Apache Axis 1.2alpha Dec 01, 2003 (04:33:24 EST) WSDL2Java emitter.
       */
      
      package tutorial.testing;
      
      public interface TutorialHelloEndpoint extends java.rmi.Remote {
       public java.lang.String sayHello(java.lang.String in0) throws java.rmi.RemoteException;
       public java.lang.String meetAnimal(tutorial.testing.Animal in0) throws java.rmi.RemoteException;
       public tutorial.testing.Animal createAnimal(int in0, java.lang.String in1) throws java.rmi.RemoteException;
      }
      


      My wsdl-file:
      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions targetNamespace="http://Hello"
       xmlns:impl="http://Hello" xmlns:intf="http://Hello"
       xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:apachesoap="http://xml.apache.org/xml-soap"
       xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
       xmlns="http://schemas.xmlsoap.org/wsdl/">
      <!--WSDL created by Apache Axis version: 1.2
      Built on May 03, 2005 (02:20:24 EDT)-->
       <wsdl:types>
       <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://Hello">
       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
       <complexType name="Animal">
       <sequence>
       <element name="age" type="xsd:int"/>
       <element name="name" nillable="true" type="soapenc:string"/>
       </sequence>
       </complexType>
       </schema>
       </wsdl:types>
       <wsdl:message name="sayHelloRequest">
       <wsdl:part name="in0" type="soapenc:string"/>
       </wsdl:message>
       <wsdl:message name="meetAnimalRequest">
       <wsdl:part name="in0" type="impl:Animal"/>
       </wsdl:message>
       <wsdl:message name="sayHelloResponse">
       <wsdl:part name="sayHelloReturn" type="soapenc:string"/>
       </wsdl:message>
       <wsdl:message name="createAnimalResponse">
       <wsdl:part name="createAnimalReturn" type="impl:Animal"/>
       </wsdl:message>
       <wsdl:message name="meetAnimalResponse">
       <wsdl:part name="meetAnimalReturn" type="soapenc:string"/>
       </wsdl:message>
       <wsdl:message name="createAnimalRequest">
       <wsdl:part name="in0" type="xsd:int"/>
       <wsdl:part name="in1" type="soapenc:string"/>
       </wsdl:message>
       <wsdl:portType name="TutorialHelloEndpoint">
       <wsdl:operation name="sayHello" parameterOrder="in0">
       <wsdl:input name="sayHelloRequest" message="impl:sayHelloRequest"/>
       <wsdl:output name="sayHelloResponse" message="impl:sayHelloResponse"/>
       </wsdl:operation>
       <wsdl:operation name="meetAnimal" parameterOrder="in0">
       <wsdl:input name="meetAnimalRequest" message="impl:meetAnimalRequest"/>
       <wsdl:output name="meetAnimalResponse" message="impl:meetAnimalResponse"/>
       </wsdl:operation>
       <wsdl:operation name="createAnimal" parameterOrder="in0 in1">
       <wsdl:input name="createAnimalRequest" message="impl:createAnimalRequest"/>
       <wsdl:output name="createAnimalResponse" message="impl:createAnimalResponse"/>
       </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="TutorialHelloEndpointPortSoapBinding" type="impl:TutorialHelloEndpoint">
       <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
       <wsdl:operation name="sayHello">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="sayHelloRequest">
       <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://Hello"/>
       </wsdl:input>
       <wsdl:output name="sayHelloResponse">
       <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://Hello"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="meetAnimal">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="meetAnimalRequest">
       <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://Hello"/>
       </wsdl:input>
       <wsdl:output name="meetAnimalResponse">
       <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://Hello"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="createAnimal">
       <wsdlsoap:operation soapAction=""/>
       <wsdl:input name="createAnimalRequest">
       <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://Hello"/>
       </wsdl:input>
       <wsdl:output name="createAnimalResponse">
       <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://Hello"/>
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="TutorialHelloEndpointService">
       <wsdl:port name="TutorialHelloEndpointPort" binding="impl:TutorialHelloEndpointPortSoapBinding">
       <wsdlsoap:address location="http://this.value.is.replaced.by.jboss"/>
       </wsdl:port>
       </wsdl:service>
      </wsdl:definitions>
      



        • 1. Re: Could not find deserializer for type
          Jason Greene Master

          Don't use soap encoding, sitch to either rpc/literal or doc/literal. Read the wiki, and look at the step-by-step tutorials.

          Thanks
          -Jason

          • 2. Re: Could not find deserializer for type
            Alexander Meisinger Newbie

            I forgot to write a META-INF/ws4ee-deployment.xml file
            (similar to: http://wiki.jboss.org/wiki/Wiki.jsp?page=WSTypeMapping).

            After this it worked.

            <deployment
             xmlns='http://xml.apache.org/axis/wsdd/'
             xmlns:java='http://xml.apache.org/axis/wsdd/providers/java'
             xmlns:soap='http://schemas.xmlsoap.org/soap/encoding/'
             xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance'
             xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
            
             <typeMapping
             qname='ns1:Animal'
             xmlns:ns1='http://Hello'
             type='java:interfaces.Animal'
             serializer='org.jboss.axis.encoding.ser.BeanSerializerFactory'
             deserializer='org.jboss.axis.encoding.ser.BeanDeserializerFactory'
             encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
             />
            </deployment>
            


            • 3. Re: Could not find deserializer for type
              Alexander Meisinger Newbie

              Hi to everyone!

              I made some attempts with complex types. Now they're working after inserting the corresponding typeMapping.

              I tried a new method: String setStrings(String[]) and there is the same error like before:

              No deserializer defined for array type {http://www.w3.org/2003/05/soap-encoding}string.

              My ws4ee-deployment.xml looks like

              <deployment
               xmlns='http://xml.apache.org/axis/wsdd/'
               xmlns:java='http://xml.apache.org/axis/wsdd/providers/java'
               xmlns:soap='http://schemas.xmlsoap.org/soap/encoding/'
               xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance'
               xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
              
               ...
              
               <typeMapping
               qname="ns1:ArrayOf_soapenc_string"
               xmlns:ns1='http://Hello'
               type="java:java.lang.String[]"
               serializer="org.jboss.axis.encoding.ser.ArraySerializerFactory"
               deserializer="org.jboss.axis.encoding.ser.ArrayDeserializerFactory"
               encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
               />
               ...
              


              My wsdl file:
              <complexType name="ArrayOf_soapenc_string">
               <complexContent>
               <restriction base="soapenc:Array">
               <attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
               </restriction>
               </complexContent>
              </complexType>
              


              The method String[] getStrings() works without the typeMapping.


              Is there any solution available for this problem?

              • 4. Re: Could not find deserializer for type
                Jason Greene Master

                Once again do not use soap encoding, use document/literal or rpc/literal. .
                Arrays need to be nested in a javabean in order to work properly.

                -Jason

                • 5. Re: Could not find deserializer for type
                  Alexander Meisinger Newbie

                  Hello Tom,


                  Once again do not use soap encoding, use document/literal or rpc/literal. Arrays need to be nested in a javabean in order to work properly.

                  I did what you've recommended and for datatypes like int, string and my complex type Animal it works. But for arrays it does not work.

                  What did I wrong?

                  Here is my new wsdl-file (rpc/literal)
                  <?xml version="1.0" encoding="UTF-8"?>
                  <wsdl:definitions targetNamespace="http://Hello"
                  xmlns:impl="http://Hello" xmlns:intf="http://Hello"
                  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
                  xmlns:apachesoap="http://xml.apache.org/xml-soap"
                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns="http://schemas.xmlsoap.org/wsdl/">
                  <!--WSDL created by Apache Axis version: 1.2
                  Built on May 03, 2005 (02:20:24 EDT)-->
                   <wsdl:types>
                   <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://Hello">
                   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
                   <complexType name="Animal">
                   <sequence>
                   <element name="age" type="xsd:int"/>
                   <element name="name" nillable="true" type="xsd:string"/>
                   </sequence>
                   </complexType>
                   <complexType name="ArrayOfAnimal">
                   <sequence>
                   <element name="item" type="impl:Animal" minOccurs="0" maxOccurs="unbounded"/>
                   </sequence>
                   </complexType>
                   <complexType name="AnimalArray">
                   <sequence>
                   <element name="animalArray" nillable="true" type="impl:ArrayOfAnimal"/>
                   </sequence>
                   </complexType>
                   </schema>
                   </wsdl:types>
                   <wsdl:message name="createAnimalResponse">
                   <wsdl:part name="createAnimalReturn" type="impl:Animal"/>
                   </wsdl:message>
                   <wsdl:message name="greetAnimalRequest">
                   <wsdl:part name="in0" type="impl:Animal"/>
                   </wsdl:message>
                   <wsdl:message name="sayRoarRequest">
                   <wsdl:part name="in0" type="xsd:string"/>
                   </wsdl:message>
                   <wsdl:message name="getAnimalsResponse">
                   <wsdl:part name="getAnimalsReturn" type="impl:AnimalArray"/>
                   </wsdl:message>
                   <wsdl:message name="getAnimalsRequest">
                   </wsdl:message>
                   <wsdl:message name="greetAnimalResponse">
                   <wsdl:part name="greetAnimalReturn" type="xsd:string"/>
                   </wsdl:message>
                   <wsdl:message name="sayRoarResponse">
                   <wsdl:part name="sayRoarReturn" type="xsd:string"/>
                   </wsdl:message>
                   <wsdl:message name="createAnimalRequest">
                   <wsdl:part name="in0" type="xsd:string"/>
                   <wsdl:part name="in1" type="xsd:int"/>
                   </wsdl:message>
                   <wsdl:portType name="AnimalEndpoint">
                   <wsdl:operation name="sayRoar" parameterOrder="in0">
                   <wsdl:input name="sayRoarRequest" message="impl:sayRoarRequest"/>
                   <wsdl:output name="sayRoarResponse" message="impl:sayRoarResponse"/>
                   </wsdl:operation>
                   <wsdl:operation name="greetAnimal" parameterOrder="in0">
                   <wsdl:input name="greetAnimalRequest" message="impl:greetAnimalRequest"/>
                   <wsdl:output name="greetAnimalResponse" message="impl:greetAnimalResponse"/>
                   </wsdl:operation>
                   <wsdl:operation name="createAnimal" parameterOrder="in0 in1">
                   <wsdl:input name="createAnimalRequest" message="impl:createAnimalRequest"/>
                   <wsdl:output name="createAnimalResponse" message="impl:createAnimalResponse"/>
                   </wsdl:operation>
                   <wsdl:operation name="getAnimals">
                   <wsdl:input name="getAnimalsRequest" message="impl:getAnimalsRequest"/>
                   <wsdl:output name="getAnimalsResponse" message="impl:getAnimalsResponse"/>
                   </wsdl:operation>
                   </wsdl:portType>
                   <wsdl:binding name="AnimalEndpointPortSoapBinding" type="impl:AnimalEndpoint">
                   <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
                   <wsdl:operation name="sayRoar">
                   <wsdlsoap:operation soapAction=""/>
                   <wsdl:input name="sayRoarRequest">
                   <wsdlsoap:body use="literal" namespace="http://Hello"/>
                   </wsdl:input>
                   <wsdl:output name="sayRoarResponse">
                   <wsdlsoap:body use="literal" namespace="http://Hello"/>
                   </wsdl:output>
                   </wsdl:operation>
                   <wsdl:operation name="greetAnimal">
                   <wsdlsoap:operation soapAction=""/>
                   <wsdl:input name="greetAnimalRequest">
                   <wsdlsoap:body use="literal" namespace="http://Hello"/>
                   </wsdl:input>
                   <wsdl:output name="greetAnimalResponse">
                   <wsdlsoap:body use="literal" namespace="http://Hello"/>
                   </wsdl:output>
                   </wsdl:operation>
                   <wsdl:operation name="createAnimal">
                   <wsdlsoap:operation soapAction=""/>
                   <wsdl:input name="createAnimalRequest">
                   <wsdlsoap:body use="literal" namespace="http://Hello"/>
                   </wsdl:input>
                   <wsdl:output name="createAnimalResponse">
                   <wsdlsoap:body use="literal" namespace="http://Hello"/>
                   </wsdl:output>
                   </wsdl:operation>
                   <wsdl:operation name="getAnimals">
                   <wsdlsoap:operation soapAction=""/>
                   <wsdl:input name="getAnimalsRequest">
                   <wsdlsoap:body use="literal" namespace="http://Hello"/>
                   </wsdl:input>
                   <wsdl:output name="getAnimalsResponse">
                   <wsdlsoap:body use="literal" namespace="http://Hello"/>
                   </wsdl:output>
                   </wsdl:operation>
                   </wsdl:binding>
                   <wsdl:service name="AnimalEndpointService">
                   <wsdl:port name="AnimalEndpointPort" binding="impl:AnimalEndpointPortSoapBinding">
                   <wsdlsoap:address location="http://this.value.is.replaced.by.jboss"/>
                   </wsdl:port>
                   </wsdl:service>
                  </wsdl:definitions>
                  


                  my Animal class looks like:
                  public class Animal {
                   private String name;
                   private int age;
                  
                  ... constructor/setters/getters
                  


                  According to the wiki http://wiki.jboss.org/wiki/Wiki.jsp?page=WSArrayTypeMapping my AnimalArray looks like:
                  public class AnimalArray {
                  
                   private Animal[] animalArray;
                  
                   public Animal[] getAnimalArray() {
                   return animalArray;
                   }
                  
                   public void setAnimalArray(Animal[] animalArray) {
                   this.animalArray = animalArray;
                   }
                  }
                  


                  I made a new JavaBean for my animal-array but during the test following error appeared:

                  AxisFault
                   faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
                   faultSubcode:
                   faultString: org.xml.sax.SAXException: Invalid element in testing.ArrayOfAnimal - age
                   faultActor:
                   faultNode:
                   faultDetail:
                   {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Invalid element in testing.ArrayOfAnimal - age
                   at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:260)
                   at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1040)
                   at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
                   at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:856)
                   at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:235)
                   at org.apache.axis.message.RPCElement.getParams(RPCElement.java:349)
                  


                  What did I wrong? I hope you can help me again.

                  Thanks in advance,
                  Alex

                  • 6. Re: Could not find deserializer for type
                    Philippe Schneider Newbie

                     

                    "jason.greene@jboss.com" wrote:
                    Once again do not use soap encoding, use document/literal or rpc/literal. .
                    Arrays need to be nested in a javabean in order to work properly.

                    -Jason


                    --> is this also true for Arrays with simple types like double[] - Arrays?
                    Thanks a lot
                    [I have JBoss Version 4.0.2 and get the fault
                    13:42:51,639 WARN [JavaWsdlMapping] Cannot find jaxrpc-mapping for type: {http://org.jboss.test.webservice/samples/types/arrays/}doubleArray
                    13:42:51,689 WARN [TypeMappingDescription] Class not found: org.jboss.test.webservice.samples._arrays.doubleArray]

                    • 7. Re: Could not find deserializer for type
                      Alexander Meisinger Newbie

                      Hi,

                      I've tested it with an int-Array, too. And I have to use a IntArray-JavaBean. With that it works.

                      public class IntArray {
                       private int[] intArray;
                      
                       public int[] getIntArray() {
                       return intArray;
                       }
                      
                       public void setIntArray(int[] intArray) {
                       this.intArray = intArray;
                       }
                      }
                      



                      Regards,
                      Alex

                      • 8. Re: Could not find deserializer for type
                        Gary Moore Newbie

                         

                        "ameisinger" wrote:
                        Hi to everyone!

                        I made some attempts with complex types. Now they're working after inserting the corresponding typeMapping.

                        I tried a new method: String setStrings(String[]) and there is the same error like before:

                        No deserializer defined for array type {http://www.w3.org/2003/05/soap-encoding}string.

                        My ws4ee-deployment.xml looks like
                        
                        <deployment
                         xmlns='http://xml.apache.org/axis/wsdd/'
                         xmlns:java='http://xml.apache.org/axis/wsdd/providers/java'
                         xmlns:soap='http://schemas.xmlsoap.org/soap/encoding/'
                         xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance'
                         xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
                        
                         ...
                        
                         <typeMapping
                         qname="ns1:ArrayOf_soapenc_string"
                         xmlns:ns1='http://Hello'
                         type="java:java.lang.String[]"
                         serializer="org.jboss.axis.encoding.ser.ArraySerializerFactory"
                         deserializer="org.jboss.axis.encoding.ser.ArrayDeserializerFactory"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                         />
                         ...
                        


                        My wsdl file:
                        
                        <complexType name="ArrayOf_soapenc_string">
                         <complexContent>
                         <restriction base="soapenc:Array">
                         <attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
                         </restriction>
                         </complexContent>
                        </complexType>
                        


                        The method String[] getStrings() works without the typeMapping.


                        Is there any solution available for this problem?


                        • 9. Re: Could not find deserializer for type
                          geekgurl Newbie

                           

                          "ameisinger" wrote:
                          Hi to everyone!

                          I made some attempts with complex types. Now they're working after inserting the corresponding typeMapping.

                          I tried a new method: String setStrings(String[]) and there is the same error like before:

                          No deserializer defined for array type {http://www.w3.org/2003/05/soap-encoding}string.

                          My ws4ee-deployment.xml looks like
                          
                          <deployment
                           xmlns='http://xml.apache.org/axis/wsdd/'
                           xmlns:java='http://xml.apache.org/axis/wsdd/providers/java'
                           xmlns:soap='http://schemas.xmlsoap.org/soap/encoding/'
                           xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance'
                           xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
                          
                           ...
                          
                           <typeMapping
                           qname="ns1:ArrayOf_soapenc_string"
                           xmlns:ns1='http://Hello'
                           type="java:java.lang.String[]"
                           serializer="org.jboss.axis.encoding.ser.ArraySerializerFactory"
                           deserializer="org.jboss.axis.encoding.ser.ArrayDeserializerFactory"
                           encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                           />
                           ...
                          


                          My wsdl file:
                          
                          <complexType name="ArrayOf_soapenc_string">
                           <complexContent>
                           <restriction base="soapenc:Array">
                           <attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:string[]" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
                           </restriction>
                           </complexContent>
                          </complexType>
                          


                          The method String[] getStrings() works without the typeMapping.


                          Is there any solution available for this problem?


                          • 10. Re: Could not find deserializer for type
                            Alexander Meisinger Newbie

                            Hello geekgurl.

                            Try to implement a complex type for your arrays. For an int-Array the complex type should look like:

                            public class IntArray {
                             private int[] intArray;
                            
                             public int[] getIntArray() {
                             return intArray;
                             }
                            
                             public void setIntArray(int[] intArray) {
                             this.intArray = intArray;
                             }
                            }
                            


                            Using the complex Type (IntArray) looks like this:

                            IntArray iAry = new IntArray();
                            iAry.setIntArray(...);
                            endpoint.doSomething(iAry);
                            


                            I hope this will help you.

                            Best Regards,
                            Alex