14

The SOAP specs are confusing, numerous, and available in multiple versions, and my soap library's WSDL generator is buggy. What's the correct WSDL for an array of integers? Could it be:

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

or is it (from the wsdl spec):

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

Or how about:

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

Or something else?

joeforker
  • 36,731
  • 34
  • 138
  • 231

1 Answers1

10

First two versions are using SOAP Encoding. Third one is normal way of defining arrays when using XML schema.

Jehof
  • 32,386
  • 9
  • 115
  • 149