pp108 : getDataset()

getDataset()


Sends the Get Request of the model to the application service and retrieves the specific business object.

Syntax

Script modelID.getDataset()


Return Value

Returns no value.

Remarks

In case the current data is modified, this method synchronizes it with the application service before retrieving data. The data retrieved by this method can be accessed through the getData() method of the model.

Example

  1. Drag and drop a Web service into an XForm designer to create a model. You can also include the SOAP request in the XML editor as shown below:
    Request xml to be placed in the XML Editor.
    This request is set to the Get method by setMethodRequest().
    <xml id="employeesRequest">
        <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
             <SOAP:Body>
                  <GetEmployees xmlns="http://schemas.cordys.com/1.0/demo/northwind">
                      <cursor numRows="5"/>
                      <fromEmployeeID>1</fromEmployeeID>
                      <toEmployeeID>3</toEmployeeID>
                  </GetEmployees>
             </SOAP:Body>
        </SOAP:Envelope>
    </xml>
  2. To synchronize data, call the method directly as shown below:
    newModel.getDataset();
  3. If you create the model through an XML request, set the XML document as the method request and synchronize the data.
    //Set and fire request
    newModel.setMethodRequest(employeesRequest.XMLDocument, "Get");
    newModel.getDataset();

    Applies to


    Model