show / hide menu

Web service with XML output

This example explains on how to configure the AppForms to a web service with XML result.

Step 1: Creating the DataSource

We have to create a new DataSource with the type Webservice. The datasource details will be as shown in the image below.

Step 2: Creating the form with required controls

We have to create a form with two textboxes. One for the input name, the next will be to display the XML response.

Step 3: DataSource configuration

  1. We have to create a new form datasource from the DataSource panel by clicking the create datasource button. The datasource type should be WebService as shown in the image below 

2. Select the DataSource we created with the name WS and click next.

3. Click on Add button to create a new command

4. Select the webmethod GetList as shown in the image below and click next.

5. The next screen will bring up the request soap. We have to click next to bind the form control to the request. Type in the input parameter should be mapped to the control in the form as shown below.

6. Click next and it will take you to the response soap screen. We can click next to get to the form which will allow us to configure the response to the form controls.
Now in this example we have a XML output, so it cannot be configured directly to a control. We have to map a XML node to the control. (1) To do this we have to select the node first and then (2) type in the control name in the textbox on the right. (3)Clicking on add button will add the node to control mapping. Please check the image below.

7. Now click next and finish the wizard which will take you to the screen where we can map the execute rule of this command. Click on the “Manage Execute Rule” button to add the execute rule for this command.

8. In this example we can have the txtListName as the trigger which will make sure that the webmethod will be executed once we have entered the value in the textbox. Clicking on the Create Rule button will create the execute rule for this command. Finish the wizard to go to the forms designer.

Step 4: Form Preview

Clicking on preview will allow us to check the output of the form. If we enter a valid list name, user can see the xml response in the response text box control.