tags:

views:

74

answers:

1

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?

+1  A: 

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

[1] http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383522

Milinda Pathirage