Try OpenEdge Now
skip to main content
Web Services
Understanding WSDL Details : Defining TABLE (static temp-table) parameters
 

Defining TABLE (static temp-table) parameters

TABLE parameters pass data only, because the static temp-table's schema is known at WSDL generation. OpenEdge Web services map a TABLE definition to a <complexType> consisting of a <sequence> of elements that represent a row (temp-table record). Each <element> in this sequence represents a column (temp-table field) of the row. For all SOAP formats, a TABLE parameter is defined as a <complexType> that references the corresponding row element <complexType>.
The following WSDL sample defines a TABLE row named, staticTT_ttEmpRow, with two columns, Name and Number:

TABLE parameter row schema for all SOAP formats

<complexType name="staticTT_ttEmpRow">
  <sequence>
    <element name="Name" nillable="true" type="xsd:string"/>
    <element name="Number" nillable="true" type="xsd:int"/>
  </sequence>
</complexType>
The following WSDL sample defines a temp-table parameter for the ttEmp row using the RPC/Encoded SOAP format. Note that the parameter is a SOAP array of rows:

TABLE parameter for RPC/Encoded

<complexType name="ArrayOfstaticTT_ttEmpRow">
   <complexContent>
      <restriction base="soapenc:Array">
         <attribute ref="soapenc:arrayType"
            wsdl:arrayType="S2:staticTT_ttEmpRow[]"/>
      </restriction>
   </complexContent>
</complexType>
The following WSDL sample defines a TABLE parameter using the Doc/Lit or RPC/Literal SOAP formats. Note that the parameter is a sequence of multiple rows:

TABLE parameter for RPC/Literal and Doc/Lit

<complexType name="staticTT_ttEmpParam">
  <sequence>
    <element maxOccurs="unbounded" minOccurs="0" name="ttEmpRow"
             type="S2:staticTT_ttEmpRow" />
  </sequence>
</complexType>
For these SOAP formats, the row element name (ttEmpRow) is used to identify each element that holds a data row sent in SOAP messages that pass a TABLE parameter.
Each column of a TABLE row can hold any data type shown in the following table.
Table 71. XML data types for TABLE parameter columns
ABL data type
XML Schema data type
BLOB1
xsd:base64Binary
CHARACTER
xsd:string
CLOB2
xsd:string
COM-HANDLE
xsd:long
DATE
xsd:date
DATETIME
xsd:dateTime
DATETIME-TZ
xsd:dateTime
DECIMAL
xsd:decimal
INT64
xsd:long
INTEGER (32 bit)
xsd:int
LOGICAL
xsd:boolean
RAW
xsd:base64Binary
RECID (32 or 64 bit)
xsd:long
ROWID
xsd:base64Binary
WIDGET-HANDLE
xsd:long

1 BLOB and CLOB data types are designed to support very large objects. Use of these data types for table fields in Web services can result in a serious performance impact.

2 BLOB and CLOB data types are designed to support very large objects. Use of these data types for table fields in Web services can result in a serious performance impact.