Hi All, I have written a single SOAP client am not specifying any return type or any parameter types in my SOAP client. This is to keep using only one client for all my services and I pass all my arguments in the standard Object Array.
I have got this working for passing HashMap with String Array as its elements and have got no serialization problem. I understand for most of the Java. Util datatypes Axis has the code to serialize inbuilt. Now I am trying to pass a Hashtable to my service as a parameter which contains some string elements and a couple of Vectors. This is giving me a Bad Type exception. Does anybody have an idea as to why this doesnt work. I am pasting the Soap Message as seen in the DEBUG output from AXIS and also the exception. Exception ========= DEBUG [Thread-5] (ServiceabilitySoapClient.java:77) - CurrentStatusService access exceptionorg.xml.sax.SAXException: Bad types (class java.util.HashMap -> class java.util.Vector)DEBUG [Thread-5] (NSStack.java:110) - NSPush (32)DEBUG [Thread-5] (ProjectResourceBundle.java:111) - org.apache.axis.i18n.resource::handleGetObject(empty00)DEBUG [Thread-5] (NSStack.java:136) - NSPop (empty)AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Bad types (class java.util.HashMap -> class java.util.Vector) faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Bad types (class java.util.HashMap -&gt; class java.util.Vector) faultActor: faultNode: faultDetail:org.xml.sax.SAXException: Bad types (class java.util.HashMap -> class java.util.Vector) at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169) at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538) at org.apache.axis.Message.getSOAPEnvelope(Message.java:376) at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:675) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180) at org.apache.axis.client.Call.invokeEngine(Call.java:2564) at org.apache.axis.client.Call.invoke(Call.java:2553) at org.apache.axis.client.Call.invoke(Call.java:2248)at org.apache.axis.client.Call.invoke(Call.java:2171) at org.apache.axis.client.Call.invoke(Call.java:1691) at com.hsbc.cms.serviceability.client.ServiceabilitySoapClient.invokeService(ServiceabilitySoapClient.java:70) at com.hsbc.cms.serviceability.actions.BasicLogAction.execute(BasicLogAction.java:215) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at com.hsbc.cms.serviceability.CMSActionServlet.process(CMSActionServlet.java:108) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:479) ========================================================================================================================== SOAP message ----------------------- oapenv: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> <ns1:getDBReportsoapenv:encodingStyle ="http://schemas.xmlsoap.org/soap/encoding/"xmlns:ns1 ="urn:ExceptionReportViewService"> <ns1:arg0 href="#id0"/> </ns1:getDBReport> <multiRef id="id0" soapenc:root="0"soapenv:encodingStyle ="http://schemas.xmlsoap.org/soap/encoding/"xsi:type="ns2:Map" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"xmlns:ns2 ="http://xml.apache.org/xml-soap"> <item> <key xsi:type="xsd:string">BASIC_LOG_SORT_VALUE</key> <value xsi:type="xsd:string">TIMESTAMP</value> </item> <item> <key xsi:type ="xsd:string">BASIC_LOG_PRIORITY</key> <value href="#id1"/> </item> <item> <key xsi:type="xsd:string">BASIC_LOG_START_TIME</key> <value xsi:type="xsd:dateTime">2003-10-27T05:00:00.000Z</value> </item> <item> <key xsi:type="xsd:string">BASIC_LOG_CATEGORY</key> <value href="#id2"/> </item> <item> <key xsi:type="xsd:string">BASIC_LOG_MESSAGE</key> <value xsi:type="xsd:string"></value> </item> <item> <key xsi:type ="xsd:string">BASIC_LOG_END_TIME</key> <value xsi:type ="xsd:dateTime">2003-10-27T19:13:46.000Z</value> </item> </multiRef> <multiRef id="id1" soapenc:root="0"soapenv:encodingStyle ="http://schemas.xmlsoap.org/soap/encoding/"xsi:type="ns3:Vector" xmlns:ns3 ="http://xml.apache.org/xml-soap"xmlns:soapenc ="http://schemas.xmlsoap.org/soap/encoding/"/> <multiRef id="id2" soapenc:root="0"soapenv:encodingStyle ="http://schemas.xmlsoap.org/soap/encoding/"xsi:type="ns4:Vector" xmlns:ns4 ="http://xml.apache.org/xml-soap"xmlns:soapenc ="http://schemas.xmlsoap.org/soap/encoding/"> <item xsi:type="xsd:string">com.abc.xyz.myinterface.myservlet</item> </multiRef> </soapenv:Body></soapenv:Envelope> ************************************************************************ This E-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. ************************************************************************