未定义的complexType'http://schmeas.xmlsoap.org/soap/encoding/:Array'用作复杂类型限制的基础

时间:2011-06-21 12:36:20

标签: .net soap xsd wsdl axis

我正在尝试从我的.NET应用程序的AXIS服务获取数据。到目前为止,我能够收集像int,string ......这样的简单数据。但是当我尝试获取像long []这样的数组数据时,数组只包含正确的数据计数,但只包含零值而不是我想要的ID。

我的WSDL看起来像这样:

        <wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:intf="urn:api.broadmail.de/soap11/RpcRecipientList" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://lang.java" xmlns:impl="urn:api.broadmail.de/soap11/RpcRecipientList" targetNamespace="urn:api.broadmail.de/soap11/RpcRecipientList" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:api.broadmail.de/soap11/RpcRecipientList">
          <xsd:import namespace="http://lang.java" />
          <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
          <xsd:complexType name="WebserviceException">
            <xsd:sequence>
              <xsd:element name="cause" nillable="true" type="xsd:anyType" />
              <xsd:element name="message" nillable="true" type="xsd:string" />
            </xsd:sequence>
          </xsd:complexType>
          <xsd:complexType name="ArrayOf_xsd_string">
            <xsd:complexContent mixed="false">
              <xsd:restriction base="soapenc:Array">
                <xsd:attribute wsdl:arrayType="xsd:string[]" ref="soapenc:arrayType" />
              </xsd:restriction>
            </xsd:complexContent>
          </xsd:complexType>
          <xsd:complexType name="ArrayOf_xsd_long">
            <xsd:complexContent mixed="false">
              <xsd:restriction base="soapenc:Array">
                <xsd:attribute wsdl:arrayType="xsd:long[]" ref="soapenc:arrayType" />
              </xsd:restriction>
            </xsd:complexContent>
          </xsd:complexType>
          <xsd:complexType name="ArrayOfArrayOf_xsd_string">
            <xsd:complexContent mixed="false">
              <xsd:restriction base="soapenc:Array">
                <xsd:attribute wsdl:arrayType="xsd:string[][]" ref="soapenc:arrayType" />
              </xsd:restriction>
            </xsd:complexContent>
          </xsd:complexType>
        </xsd:schema>
      </wsdl:types>
      <wsdl:message name="getDataSetRequest">
        <wsdl:part name="in0" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="setNameResponse" />
      <wsdl:message name="WebserviceException">
        <wsdl:part name="fault" type="impl:WebserviceException" />
      </wsdl:message>
      <wsdl:message name="getDescriptionRequest">
        <wsdl:part name="in0" type="xsd:string" />
        <wsdl:part name="in1" type="xsd:long" />
      </wsdl:message>
.....

当我用VS2010打开它时,下面的行加下划线:

<xsd:restriction base="soapenc:Array">

说出以下错误:

'未定义的complexType'http://schmeas.xmlsoap.org/soap/encoding/:Array'用作复杂类型限制的基础'

我不明白问题是什么,这可能就是为什么我只得到零值? (我的意思并不是说空值。)

1 个答案:

答案 0 :(得分:1)

经过几个小时的尝试和搜索解决方案后,我可能会找到解决这个问题的方法。也许你们可以通过以下链接获得帮助

Solution 1