Try OpenEdge Now
skip to main content
Web Services
Developing a Java Client to Consume OpenEdge SOAP Web Services : ProDataSet parameters in Java Web service clients : DATASET-HANDLE (dynamic ProDataSet) parameters
 

DATASET-HANDLE (dynamic ProDataSet) parameters

In Java, the client interface for a DATASET-HANDLE parameter is based on the following:
*For every Web service object containing a method that passes a DATASET-HANDLE parameter, the WSDL contains a <DatasetHandleParam> element defined as a <complexType> definition. Therefore, a DatasetHandleParam class is created for every client object which contains a method that passes a DATSET-HANDLE parameter.
*For input DATASET-HANDLE parameters, the client must create a DatasetHandleParam object, consisting of a MessageElement array containing the XML Schema and data for the DATASET-HANDLE. For output DATASET-HANDLE parameters, the client must parse the XML Schema and data in the MessageElement array.
The following code snippet reads an OUTPUT DATASET-HANDLE from a Web service, outDynDS:
Table 57. Reading OUTPUT DATASET-HANDLE in Java
StringHolder retval = new StringHolder();
DataSetHandleParamHolder dsParamH = new DataSetHandleParamHolder();

// call outDyn.p on appserver
appobj.outDyn(retval, dsParamH);

DataSetHandleParam dsParam = dsParamH.value;
MessageElement domElem[] = new MessageElement[2];
domElem = dsParam.get_any();

// Extract the schema, followed by the data.

MessageElement schemaElem = domElem[0];
// parse the XML Schema for the Dataset

MessageElement dataElem = domElem[1];
// parse the XML Data for the Dataset
* Before-image data