0 Replies Latest reply: Dec 20, 2006 6:29 AM by 807607 RSS

    How to map ArrayList in WSDL using <complextype>

    807607
      Hi,
      I want know about how can i map the ArrayList in SOAP Client in WSDL file using <complextype>.I have been defined function like
      public synchronized ArrayList viewEmployees(String userId,String password)
      {

      }

      then in main() -
      SOAPClient s=new SOAPClient();
      s.viewEmployees("id","password");

      In the web service bean i have defined the function like-

      public ArrayList viewEmployees(String userId, String password)
      {
      //getting ArrayList from database
      ArrayList arr=getEmployees(userId);
      }

      So, ArrayList contains the Employee objects, while each Employee object contains the individual records like userId, joining_date.

      and in WSDL-

      <complexType name="ArrayOfXSDAnyType">
      <sequence>
      <element maxOccurs="unbounded" minOccurs="0" name="anyType" nillable="true" type="xsd:anyType"/>
      </sequence>
      </complexType>


      <wsdl:message name="viewEmployeeResponse">

      <wsdl:part name="viewEmployeeReturn" type="impl:ArrayOfXSDAnyType"/>

      </wsdl:message>

      So while running SOAPClient, it is giving me the SOAPException like
      No Serializer Found Error and IllegalArgumentException

      So how can i map the ArrayList ? plz help me...