To invoke a method that passes a TABLE-HANDLE parameter:
The client application must create and send an XML Schema along with the data to fully describe the dynamic temp-table in the SOAP request message. The TABLE-HANDLE parameter in a SOAP request or response consists of an XML <DataSet> element containing two child elements:
An XML Schema element, <schema>, representing the schema for the TABLE-HANDLE
An XML representation of data using an element, <Data>, with each row represented as a sub-element, <Item>
A non-ABL client application must parse the XML Schema and data from the SOAP response message to make the TABLE-HANDLE accessible as native data within the application.
This is the ABL prototype for a sample method, dynttIO( ), that passes a TABLE-HANDLE parameter:
ABL prototype that passes a TABLE-HANDLE parameter
This is the structure of the Doc/Lit SOAP request message that the sample dynttIO method sends to pass a dynamic temp-table that you create for the ttHandle TABLE-HANDLE parameter:
Doc/Lit SOAP request for TABLE-HANDLE, ttHandle
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope namespaces defined here...>
<soap:Header .../>
<soap:Body>
<dynttIO xmlns="urn:DynTTSrvc:DynTT">
<ttHandle>
<DataSet xmlns=""> <schema> <!-- Schema definition goes here --> </schema> <Data> <!-- Data goes here --> </Data> </DataSet> </ttHandle>
</dynttIO>
</soap:Body>
</soap:Envelope>
The ttHandle TABLE-HANDLE parameter becomes an XML <ttHandle> element containing the <DataSet> element that contains the schema and the data.
Note: Not shown is any required object ID that must be sent in the SOAP header for the object on which dynttIO( ) is invoked.
This is a sample XML Schema created by VB.NET for the TABLE-HANDLE contained by the sample <DataSet> element in the sample Doc/Lit SOAP request:
TABLE-HANDLE <schema> element for an Doc/Lit SOAP request
Note the definition of the <Data> element containing the data for the table, and how the column type information is specified within the <Item> element.
This is a sample <Data> element you would create to accompany the specified schema in the sample Doc/Lit SOAP request, including the column values for the two rows initialized in the sample VB.NET code:
TABLE-HANDLE <Data> element for an Doc/Lit SOAP request