I had trouble with this before also. After much searching on the web, I've found out that there is no standard SOAP encoding for Map. Axis uses a what is known as "Apache Map standard" that is used by some toolkits (e.g. Apache SOAP, GLUE) but this is not recognized by .NET. See here for interesting discussion on this issue:
http://aspn.activestate.com/ASPN/Mail/Message/SoapBuilders/720738 If you use Map, you will not be able to work with .NET as far as I know. As for returning or passing in Hashtable, that will not work either. If you look at the definition of the complex type that is generated by Axis in the WSDL, the <sequence> element is empty: - <schema targetNamespace="http://util.java" xmlns="http://www.w3.org/2001/XMLSchema"> - <complexType name="Hashtable"> - <complexContent> - <extension base="tns1:Dictionary"> <sequence /> </extension> </complexContent> </complexType> - <complexType name="Dictionary"> <sequence /> </complexType> <element name="Hashtable" nillable="true" type="tns1:Hashtable" /> </schema> So the classes generated for Hashtable has no instance members or methods. Basically useless. Does anyone know how to get around these limitations ? One possible way is to pass an array of name-value pairs as a substitute for a map but that is so ugly. Any other suggestions ? >From: "Peake, Chris" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: .Net question using HashMap from Axis >Date: Fri, 19 Apr 2002 17:13:15 -0400 > > >Using a web service to return HashMap. The Java Axis web services >consumer >app then works perfectly. However, when I try to register the web service >in a .NET C# app, I am getting an error of "Object reference not set to an >instance of an object". This actually worked when using a Hashtable in the >webservice as the return type but doesn't when using the HashMap. Whereas >Axis client had problem with the Hashtable return object. > > >Any ideas? > > >Chris Peake > > > _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx