Hi,
We are writing Web Service using Java, AXIS and Tomcat.
One of our interface methods has ArrayList as an argument. Eclipse with WTP generates wsdl and Web Service server.
The client of the WS written in C++ using gSOAP. It was generated from wsdl. When I tried to execute remote the method, I got "cannot find deserializer for ArrayOf_xsd_AnyType ... " error, i.e. AXIS doesn't know to how to parse XML into ArrayList object.
I wrote some simple serializer and deserializer, added it to deploy.wsdd, but AXIS still doesn't see it.
What the problem may be?
What is the right way to work with ArrayList?
Captured request:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="http://exception.dto.profileManager.session.ejb.jglue.genesis.somehost.org" xmlns:ns1="http://impl.profileManager.session.ejb.jglue.genesis.somehost.org">
<SOAP-ENV:Body>
<ns1:createMailingList>
<ns1:subscriberId>subId</ns1:subscriberId>
<ns1:mailingListID>listId</ns1:mailingListID>
<ns1:mlEntries xsi:type="ns1:ArrayOf_xsd_anyType">
<item xmlns="http://impl.profileManager.session.ejb.jglue.genesis.somehost.org">one</item>
<item xmlns="http://impl.profileManager.session.ejb.jglue.genesis.somehost.org">two</item>
<item xmlns="http://impl.profileManager.session.ejb.jglue.genesis.somehost.org">three</item>
</ns1:mlEntries>
<ns1:pluginID>pluginId</ns1:pluginID>
<ns1:dbID>dbId</ns1:dbID>
<ns1:groupID>groupId</ns1:groupID>
</ns1:createMailingList>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Captured response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: Deserializing parameter 'mlEntries': could not find deserializer for type {http://impl.profileManager.session.ejb.jglue.genesis.somehost.org}ArrayOf_xsd_anyType</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">COMPUTER-NAME</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Part of wsdl:
<element name="createMailingList">
<complexType>
<sequence>
<element name="subscriberId" type="xsd:string"/>
<element name="mailingListID" type="xsd:string"/>
<element name="mlEntries" type="impl:ArrayOf_xsd_anyType"/>
<element name="pluginID" type="xsd:string"/>
<element name="dbID" type="xsd:string"/>
<element name="groupID" type="xsd:string"/>
</sequence>
</complexType>
</element>
<complexType name="ArrayOf_xsd_anyType">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:anyType"/>
</sequence>
</complexType>
wsdd:
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- Services from ProfileManagerService WSDL service -->
<service name="ProfileManager" provider="java:RPC" style="document" use="encoded">
<parameter name="wsdlTargetNamespace" value="http://profileManager.session.ejb.jglue.genesis.somehost.org"/>
<parameter name="wsdlServiceElement" value="ProfileManagerService"/>
<parameter name="wsdlServicePort" value="ProfileManager"/>
<parameter name="className" value="com.comverse.genesis.jglue.ejb.session.profileManager.ProfileManager"/>
<parameter name="wsdlPortType" value="ProfileManager"/>
<parameter name="typeMappingVersion" value="1.2"/>
<parameter name="allowedMethods" value="*"/>
<typeMapping qname="ns1:ArrayOf_xsd_anyType"
xmlns:ns="http://impl.profileManager.session.ejb.jglue.genesis.somehost.org"
languageSpecificType="java:java.utils.ArrayList"
serializer="org.apache.axis.encoding.ser.ArrayListSerializerFactory"
deserializer="org.apache.axis.encoding.ser.ArrayListDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</service>
</deployment>
Thank you in advance.
Stasik