代码之家  ›  专栏  ›  技术社区  ›  joeforker

整数数组的WSDL声明是什么?

  •  12
  • joeforker  · 技术社区  · 15 年前

    SOAP规范是混乱的、众多的,并且可以在多个版本中使用,而我的SOAP库的WSDL生成器是有缺陷的。整数数组的正确WSDL是什么?可能是:

    <element name="ArrayOfIntegers">
      <complexType base="SOAP-ENC:Array">
        <element name="integer" type="xsd:integer" maxOccurs="unbounded"/>
      </complexType>
      <anyAttribute/>
    </element>
    

    或者是(来自WSDL规范):

    <complexType name="ArrayOfFloat">
      <complexContent>
          <restriction base="soapenc:Array">
              <attribute ref="soapenc:arrayType" 
                         wsdl:arrayType="xsd:integer[]"/>
          </restriction>
      </complexContent>
    </complexType>
    

    或者说:

    <element name="ArrayOfIntegers">
     <complexType>
      <sequence>
       <element maxOccurs="unbounded" name="integer" type="xsd:int"/>
      </sequence>
     </complexType>
    </element>
    

    或者别的什么?

    1 回复  |  直到 12 年前
        1
  •  8
  •   Jehof    12 年前

    前两个版本正在使用 SOAP Encoding . 第三种是使用XML模式时定义数组的常规方法。

    推荐文章