Prev: How to prevent sun.reflect.GeneratedSerializationConstructorAccessor from being unloaded at full gc
Next: Axis2 vs. multirefs
From: shrikant on 20 Dec 2006 08:07 Hi, I am getting deserialization exception on accessing the web service. I am using apache axis for developing web service and my web server is Tomcat 5.5. I have created a java bean and used it as a parameter to web service java class. The bean class structure is as follows... public class MyCollection implements java.io.Serializable { private int actualSize; private java.lang.String[][] Hashtable; private int increamentValue; // ... and get/set methods for all three members... } and added the getter/setter methods for these private members. Object of this bean is sent to web service as method parameter. The method signature in web service class is... public String getData(MyCollection aCollection); The server-config.wsdd file has the following service definition. I am doubtful about the <typeMapping> tag. ..... <service name="ImportWebservice" provider="java:RPC" style="wrapped" use="literal"> <operation name="getData" qname="ns1:getData" returnQName="ns1:getDataReturn" returnType="xsd:string" soapAction="" xmlns:ns1="http://webservices.test.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <parameter qname="ns1:aCollection" type="ns1:MyCollection" /> </operation> <parameter name="allowedMethods" value="getData" /> <parameter name="typeMappingVersion" value="1.2" /> <parameter name="wsdlPortType" value="ImportWebservice" /> <parameter name="className" value="com.test.webservices.ImportWebservice" /> <parameter name="wsdlServicePort" value="ImportWebservice" /> <parameter name="schemaQualified" value="http://webservices.test.com" /> <parameter name="wsdlTargetNamespace" value="http://webservices.test.com" /> <parameter name="wsdlServiceElement" value="ImportWebserviceService" /> <typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" qname="ns2:MyCollection" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.test.webservices.MyCollection" xmlns:ns2="http://webservices.test.com" /> <arrayMapping innerType="xsd:string" languageSpecificType="java:java.lang.String[]" qname="ns3:ArrayOf_xsd_string" xmlns:ns3="http://webservices.test.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /> <arrayMapping innerType="ns4:ArrayOf_xsd_string" languageSpecificType="java:java.lang.String[][]" qname="ns4:ArrayOfArrayOf_xsd_string" xmlns:ns4="http://webservices.test.com" /> </service> ....... This web service is deployed properly and upon accessing this web service i am getting the following XML response from the web service. ..... <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: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType</faultstring> <detail> <ns1:hostname xmlns:ns1 = "http://xml.apache.org/axis/">ysi-in-c142</ns1:hostname> </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope> ..... Please help me identify where is the error. Whether I am missing or incorrectly written any entry in the server-config.wsdd. Thnx in advance. Shrikant |