Try OpenEdge Now
skip to main content
Web Services
Understanding WSDL Details : Array mapping in WSDL documents : RPC/Encoded
 

RPC/Encoded

For the RPC/Encoded format, an array parameter is represented as a SOAP array complexType in an XML Schema type definition, as shown:

Array parameter definition for RPC/Encoded WSDL

<complexType name="ArrayOfXMLType">
  <complexContent>
    <restriction base="soapenc:Array">
      <attribute ref=soapenc:arrayType" wsdl:arrayType="XMLType[]"/>
    </restriction>
  <complexContent>
</complexType>
The WSDL file contains a separate schema for each object defined in ProxyGen. Each such schema includes one SOAP array complexType definition for each data type used as an array parameter for any procedure or function in that object. For example, if the ABL defines one or more parameters in the object with the data type CHARACTER EXTENT, the schema includes a complexType named "ArrayOfString".
The RPC/Encoded WSDL document for the arraySample procedure shown at the beginning of this section includes the following types and message sections:

RPC/Encoded WSDL schema example

<wsdl:types>
  <schema targetNamespace="urn:tempuri-org:CustomerAO"
          xmlns="http://www.w3.org/2001/XMLSchema"
          elementFormDefault="unqualified">
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
    <complexType name="ArrayOfInt">
      <complexContent>
        <restriction base="soapenc:Array">
          <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
        </restriction>
      </complexContent>
    </complexType>
    <complexType name="ArrayOfDateTime">
      <complexContent>
        <restriction base="soapenc:Array">
          <attribute ref="soapenc:arrayType"
                     wsdl:arrayType="xsd:dateTime[]"/>
        </restriction>
      </complexContent>
    </complexType>
    <complexType name="ArrayOfString">
      <complexContent>
        <restriction base="soapenc:Array">
          <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
        </restriction>
      </complexContent>
    </complexType>
  </schema>
</wsdl:types>

. . .

<wsdl:message name="CustomerAO_arraySample">
  <part name="names"     type="S1:ArrayOfString"/>
  <part name="hireDates" type="S1:ArrayOfDateTime"/>
</wsdl:message>
<wsdl:message name="CustomerAO_arraySampleResponse">
  <part name="quotas"    type="S1:ArrayOfInt"/>
</wsdl:message>