Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge SOAP Web Services : Sample Code with SOAP Messages for OpenEdge Web Services : Passing static and dynamic ProDataSet parameters : Invoking a method with a DATASET-HANDLE parameter
Invoking a method with a DATASET-HANDLE parameter
To invoke a method that passes a DATASET-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 DATASET-HANDLE parameter in a SOAP request or response consists of an XML element containing two child elements:
*An XML schema element representing the schema for the DATASET-HANDLE
*An XML representation of data, using a data element with child elements representing individual rows for each constituent temp-table
*The client application must parse the XML Schema and data from the SOAP response message to make the DATASET-HANDLE accessible as native data within the application.
For example, the following snippet of code is from a procedure that passes a dynamic ProDataSet parameter:
/* getDynDs.p */

/* Create dataset based on criteria
** fill dataset and return to caller */
When you add a Web Reference for the Web service to Microsoft® Visual Studio, it creates the following proxies in a References file for the getDynDS operation:

Sample C#.NET proxy code for getDynDs

public string getDynDs(
   string criteria,
   out DataSetHandleParam hDset) {
      object[] results = this.Invoke("getDynDs", new object[] {
      hDset = ((DataSetHandleParam)(results[1]));
      return ((string)(results[0]));

public partial class DataSetHandleParam {
   private System.Xml.XmlElement[] anyField;
When you reference the Web service in your code, Microsoft Visual Studio offers these proxy objects as appropriate. You can then create code to access the ProDataSet parameter like the following:

Sample C#.NET code for invoking getDynDs

sampleDynDS.sampleDynDSService mySvc = new sampleDynDS.sampleDynDSService();
sampleDynDS.DataSetHandleParam dsh;

mySvc.getDynDs(textBox1.Text, out dsh);