Question
January 31, 2008 at 05:36 AM
sanjeev.m

Serializing Hash of Hash using .NET client to consume JAVa web service

by sanjeev.m . Updated 18 years, 5 months ago

Hi All,

I am really in trouble and for a long time now. My problem is like this: I have a JAVA webservice and I am writing a .NET client to consume the web service. I can consume the webservice that accept normal hashtables (by normal I mean hashtable containing key-value pair as normal strings), but the moment I try to pass a hashtable that has key as string and a value as another hashtable I get error like below:

Request message:

First key in xmlhashFirst value in xmlhashinnerhashkey in innerhashvalue in innerhash

Response message:

soapenv:Server.userExceptionorg.xml.sax.SAXException: No deserializer for {http://xml.apache.org/xml-soap}ArrayOfMapItemorg.xml.sax.SAXException: No deserializer for {http://xml.apache.org/xml-soap}ArrayOfMapItem
at org.apache.axis.encoding.DeserializerImpl.onStartElement(DeserializerImpl.java:453)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:393)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:154)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:516)
at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
at java.lang.Thread.run(Thread.java:595)
dv-dushyant-na

The problem is that the JAVA side is using Axis and the format of the hashtable it is expecting is as follows:

First key in xmlhashFirst value in xmlhashinnerhashkey in innerhashvalue in innerhash

The above request is generated by a JAVA client to consume the same web service.

The wsdl for the service is as follows:































Anyhelp would be a greatly appritiated.

This discussion is locked

All Comments