Wednesday 4 January 2012

Creating an Input Form and Report on a Web Service

The Create Form and Report on Web Service Wizard creates an input form, a submit button, and a report for displaying results. You can execute this wizard directly after creating the Web service reference from a WSDL or a RESTful style Web service, or by adding a page.
Use this wizard when you expect a nonscalar result from the Web service. The Amazon Product API Web service is a good example. This Web service returns many results based on the search criteria entered in an input form.

Creating a Form and Report After Creating a Reference

To create a form and report after creating a Web Service Reference:
  1. Create the Web service reference. See "Creating a Web Service Reference Based on a WSDL" and Creating a RESTful Web Service Reference.
  2. After the Web service reference has been added, select Create Form and Report on Web Service.
  3. For Choose Service and Operation:
    1. Web Service Reference - Select the Web service reference.
    2. Operation - Select the method to be executed. For REST style Web references, select doREST.
  4. For Page and Region Attributes, review the displayed attributes. If the page you specify does not exist, the wizard creates the page for you.
  5. For Input Items:
    1. Identify which items to add to the form. To include an item, select Yes in the Create column. Otherwise, select No.
    2. If necessary, edit the item label.
  6. If applicable, specify the Item Names and Item Labels for basic authentication. Note that this step only appears if basic authentication was specified for this Web service reference when it was created.
  7. For Window Service Results:
    1. Temporary Result Set Name - Enter a name for the collection that stores the Web service result.
    2. Result Tree to Report On (Not displayed for REST style Web service references) - Select the portion of the resulting XML document that contains the information you want to include in the report.
  8. For Result Parameters to Display, select the parameters to be included in the report.
  9. Click Finish.

Creating a Form and Report by Adding a New Page

If you have an existing Web service reference, you can create an input form and report by adding a new page.
To create a form and report by adding a new page:
  1. Create the Web service reference. See "Creating a Web Service Reference Based on a WSDL", "Creating a Web Service Reference Manually", and"Creating a RESTful Web Service Reference".
  2. Create a new page.
    In the Create Page Wizard:
    1. Select Form.
    2. Select Form and Report on Web Service.
  3. For Choose Service and Operation:
    1. Web Service Reference - Select the Web service reference.
    2. Operation - Select the method to be executed. For RESTful style Web references, doREST will be selected automatically. The Operation option will not appear for Manual style Web references.
  4. For Page and Region Attributes, review the page and region attributes. If the page you specify does not exist, the wizard creates the page for you.
  5. For Input Items:
    1. Identify which items to add to the form. To include an item, select Yes in the Create column. Otherwise, select No.
    2. If necessary, edit the item label.
  6. If applicable, specify the Item Names and Item Labels for basic authentication. Note that this step only appears if basic authentication was specified for this Web service reference when it was created.
  7. Follow the on-screen instructions.
  8. Click Finish.

No comments:

Post a Comment