To create an embeddedServiceRequest with a restRequest, follow these steps:
1. Either:
|
Right click:
|
Select Tools > Create Embedded Service Request. |
This launches the Create EmbeddedServiceRequest wizard.
2. Complete the Create EmbeddedServiceRequest dialog as follows:
|
|
ID: Nexaweb Studio automatically assigns each embeddedServiceRequest an ID of embeddedServiceRequest with a suffix incremented by one for each additional embeddedServiceRequest created. Use the provided ID or enter your own. onFailure\onSuccess: Optionally, specify an MCO or Macro to run when the request fails or succeeds. Click Advanced to create one. For more information on creating an event, see Connecting Business Logic to the User Interface. Target: Specify an existing document data source through which you can bind this data to the UI, or click New to create one. Nexaweb Studio copies the data from the data base to the document data source for use in the UI. For more information on creating a document data source ,see Creating a Data Source. Create Data Request/Specify Data Request:
|
Click Next.
A dialog listing the request types appears.
3. Select restRequest and click Next.
The Create New Web Service Request dialog appears.
4. Complete the Create New Web Service Request dialog as follows:
|
|
ID: Nexaweb Studio automatically assigns an ID as restRequest, with a suffix incremented by one for each additional request of this type created. (Except on The Web Services Request Configuration tab.) Keep the assigned ID or specify your own. Nexaweb Studio uses this ID to identify this request in the UI file. Method: Click the arrow in the Method selection box to select an HTTP method for this restRequest to execute, if any. If you do not specify a method, Nexaweb Studio uses the GET method by default. |
Click Next.
The Create Sub Elements for Web Service Request dialog appears.
5. Complete the Create Sub Elements for Web Service Request dialog as follows.
|
|
Url: Specifies the location of the REST resource. Body: Specifies the content of the body portion of a PUT or POST request. UrlParamenters: Specifies all urlParameters, which specify, in name and value pair format, additional information to send to the REST resource. Click Add to specify a parameter name/value pair, Delete to remove one, or select one from the list and click Up/Down to change their order. |
6. Click Finish.
Nexaweb Studio adds the embeddedServiceRequest to the UI file and displays the name of this embeddedServiceRequest under the Embedded Service Requests folder in the Data view.