views:

251

answers:

1

I have wsdl that needs to be interpreted by wsdl.exe (.net sdk 2.0) This wsdl is generated on runtime by axis engine, and it is reading a wsdd file to generate this.

One of my return types have java.util.Map inside and here is the schema for a map in wsdl (just one part of wsdl)

<schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      <complexType name="Map">
       <sequence>
        <element maxOccurs="unbounded" minOccurs="0" name="item">
         <complexType>
          <all>
           <element name="key" type="xsd:anyType" />
           <element name="value" type="xsd:anyType" />
          </all>
         </complexType>
        </element>
       </sequence>
      </complexType>
     </schema>

But when I run the wsdl.exe to read this wsdl I am getting following error;

  • Unable to import operation 'getXXX'.
  • Types must be declared at the top level in the schema. Please review schema type 'Map' from namespace 'http://xml.apache.org/xml-soap': element 'item' is using anonymous type declaration, anonymous types are not supported with encoded SOAP.

Does this mean that I am not allowed to use Map when it comes a web service? I couldn't be satisfied with google results...

A: 

Let me answer my own question; You should not use java.util.Map as a return type if you want to make your web services consumable by .NET
http://wiki.apache.org/ws/FrontPage/Axis/DotNetInteropMapInfo

erdogany