Previous Table of Contents Next


7.6 Mapping for SOAP Array Type

   SOAP Array type extends the “SOAP-ENC:Array? type defined in the SOAP 1.1 encoding Schema. SOAP array datatype is mapped to either a sequence or array OMG IDL construct based on the following cases:

   The name of the mapped IDL sequence or array datatype is generated from the value of the <xsd:complexType> element.

   The type of the SOAP array item, mentioned in the “type? attribute of the <xsd:element> or in the “wsdl:arrayType? attribute, becomes the base type of the mapped IDL sequence or array. This type is mapped to an OMG IDL construct according to the datatype mapping rules in this specification.

   The IDL sequence or array bound is determined from the “maxOccurs? attribute of the <xsd:element>. If “maxOccurs? value is “unbounded? for a multi-dimensional array, it can’t be mapped.

   The dimension of the array is determined from the “SOAP-ENC:arrayType? attribute.

   The following example shows the mapping of a SOAP Array datatype to OMG IDL unbounded sequence.

   <!--WSDL --><xsd:complexType name = “ArrayOfLong"><xsd:complexContent><xsd:restriction base="SOAP-ENC:Array">

   <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:int[]"/>

   </xsd:restriction></xsd:complexContent></xsd:complexType>

   // OMG IDLtypedef sequence<long> ArrayOfLong;

   The following example shows the mapping of a SOAP Array datatype to OMG IDL bounded sequence.

   <!--WSDL --><xsd:complexType name = “ArrayOfLong"><xsd:complexContent><xsd:restriction base="SOAP-ENC:Array"><xsd:sequence>

   <xsd:element name="item" type="xsd:int"minOccurs="10" maxOccurs="10"/>

   </sequence>

   <xsd:attributeref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:int[]"/>

   </xsd:restriction></xsd:complexContent></xsd:complexType>

   // OMG IDLtypedef sequence<long, 10> ArrayOfLong;