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

RPC/Literal

For the RPC/Literal format, an array parameter is represented as an unbounded sequence of its data type in an XML Schema type definition, where XMLType is the XML Schema type:

Array parameter definition for RPC/Literal WSDL

<complexType name="ArrayOfXMLType">
  <sequence>
    <element name="item" type="XMLType" minOccurs="0"
             maxOccurs="unbounded"/>
  </sequence>
</complexType>
The WSDL file contains a separate schema for each object defined in ProxyGen. Each such schema includes one 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/Literal WSDL document for the arraySample procedure shown at the beginning of this section includes the following types and message sections:

RPC/Literal WSDL schema example

<wsdl:types>
  <schema targetNamespace="urn:tempuri-org:CustomerAO"
          xmlns="http://www.w3.org/2001/XMLSchema"
          elementFormDefault="unqualified"
    <complexType name="ArrayOfInt">
      <sequence>
        <element name="item" type="xsd:int" minOccurs="0"
                 maxOccurs="unbounded"/>
      </sequence>
    </complexType>
    <complexType name="ArrayOfDateTime">
      <sequence>
        <element name="item" type="xsd:dateTime" minOccurs="0"
                 maxOccurs="unbounded"/>
      </sequence>
    </complexType>
    <complexType name="ArrayOfString">
      <sequence>
        <element name="item" type="xsd:string" minOccurs="0"
                 maxOccurs="unbounded"/>
      </sequence>
    </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>