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>
或者是其他东西?
最佳答案
前两个版本正在使用 SOAP Encoding .第三种是使用 XML 模式时定义数组的常规方法。
关于soap - 什么是整数数组的 WSDL 声明?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2054184/