Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge SOAP Web Services : Building Clients for OpenEdge SOAP Web services : Mapping relational data : Defining DATASET-HANDLE (dynamic ProDataSet) parameters
 
Defining DATASET-HANDLE (dynamic ProDataSet) parameters
DATASET-HANDLE parameters pass both the schema and data, because the dynamic ProDataSet schema is not known at compile time. In the WSDL, OpenEdge Web services map an ABL DATASET-HANDLE to an arbitrary complex type (<any>). There is a single definition used for all ProDataSet parameters in all supported SOAP formats.
For all SOAP formats, client interfaces typically represent DATASET-HANDLE parameters as follows:
*All DATASET-HANDLE parameters within a Web service object are represented as one of two objects, one for ProDataSets without before-image data and one for ProDataSets with before-image data.
*In both request messages (input) and response messages (output), the schema of the DATASET-HANDLE must accompany the data.
*For every input DATASET-HANDLE, you must include the schema of the DATASET-HANDLE in the form of an XML Schema followed by the data in the form of an XML document fragment.
*For every output DATASET-HANDLE, a non-ABL client must parse the XML Schema and data in the SOAP response message.
*For an ABL client, the WSDL Analyzer recognizes the WSDL definition of a DATASET-HANDLE parameter and maps it to a DATASET-HANDLE parameter for an ABL client.
The following WSDL sample shows this common ProDataSet parameter definition:

Common DATASET-HANDLE definition for all SOAP formats

<complexType name="DataSetHandleParam">
  <annotation>
    <documentation>This is the schema definition for an OpenEdge dynamic
     ProDataSet parameter. The first element in this sequence must be a
     w3c XML Schema document describing the definition of the ProDataSet.
     The second element contains the serialized data.
    </documentation>
  </annotation>
  <sequence>
    <any maxOccurs="2" minOccurs="2"/>
  </sequence>
</complexType>
The client application must create (for input) and parse (for output) the XML Schema along with the data for the parameter. How the client inserts the input schema and data in request messages and how it parses the output schema and data from response messages depends entirely on the client application.
This is the general format in OpenEdge Web services for representing a DATASET-HANDLE in a SOAP message:

DATASET-HANDLE parameters—general format

<DataSet>
   <schema ...>
      <element ProDataSet>
         <!-- TEMP-TABLE-1 definition in XML Schema -->
         <!-- TEMP-TABLE-2 definition in XML Schema -->
         . . .
      </element>
      . . .
   </schema>
   <ProDataSet>

      <TEMP-TABLE-1> <!--- row instance 1 --> </TEMP-TABLE-1>
      <TEMP-TABLE-1> <!--- row instance 2 --> </TEMP-TABLE-1>
      ...
      <TEMP-TABLE-2> <!--- row instance 1 --> </TEMP-TABLE-2>
      <TEMP-TABLE-2> <!--- row instance 2 --> </TEMP-TABLE-2>
      ...

   </ProDataSet>
</DataSet>