Try OpenEdge Now
skip to main content
Web Services
Understanding WSDL Details : Defining DATASET (static ProDataSet) parameters : Including before-image data

Including before-image data

Before-image data is serialized in a proprietary OpenEdge datasetChanges document. The WSDL represents the parameter as arbitrary complex data with an <any> element. XML Schema attributes from the ABL-specific namespace identify the element as a datasetChanges document.
An ABL-based client can map the <any> element to a ProDataSet parameter and parse the OpenEdge datasetChanges document into a ProDataSet and its before-image data through the READ-XML( ) method. For more information on how ABL handles before-image data in XML, see the chapter on reading and writing XML data from ProDataSets in OpenEdge Development: Working with XML. Non-ABL clients map the <any> element to an XML document that the client developer needs to parse with an XML API.
The following code snippet defines a ProDataSet with before-image data:
/* getCustOrdersBI.p */
       BEFORE-TABLE  ttCustBef
       FIELD         CustNum    AS INTEGER
       FIELD         Name       AS CHARACTER
       INDEX         CustNumIdx IS UNIQUE PRIMARY CustNum.

       BEFORE-TABLE ttOrderBef
       FIELD        OrderNum    AS INTEGER
       FIELD        CustNum     AS INTEGER
       INDEX        OrderNumIdx IS UNIQUE PRIMARY OrderNum
       INDEX        CustOrdIdx  IS UNIQUE CustNum OrderNum.

DEFINE DATASET dsCustOrd FOR ttCust, ttOrder
       DATA-RELATION CustOrdRel FOR ttCust, ttOrder
         RELATION-FIELDS (CustNum, CustNum).


/* fill dataset and return to caller */
The following WSDL sample defines the ProDataSet parameter for getCustOrdersBI.p using the Doc/Lit SOAP format:

Doc/Lit WSDL for getCustOrdersBI.p

<!-- datasetChanges document -->
<complexType name="dsCustOrdChanges"
    <any />
<!-- dataset definition -->
<element name="dsCustOrd" prodata:proDataSet="true">
      <element maxOccurs="unbounded" minOccurs="0" name="ttCust"
            <element name="CustNum" nillable="true" type="xsd:int"/>
            <element name="Name" nillable="true" type="xsd:string"/>
      <element maxOccurs="unbounded" minOccurs="0" name="ttOrder"
            <element name="OrderNum" nillable="true" type="xsd:int"/>
            <element name="CustNum" nillable="true" type="xsd:int"/>
Note: ObjectName refers to the object's name as defined in ProxyGen. Each object gets its own XML Schema.
Note that the ProDataSet parameter is described in two parts:
*An arbitrary complex type (<any />) for the OpenEdge datasetChanges document
*The ProDataSet definition specifying the before-image tables with the prodata:beforeTable attribute
The RPC styles use the same structure for the dataset definition.