开发者

Java .Net Interop. Axis java.util.Map

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">
            <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 suppo开发者_运维知识库rted 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...


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜