Wednesday 4 January 2012

Creating a Form on a Web Service

The Create Form on Web Service Wizard creates a form and a submit button. You can execute this wizard after creating the Web service reference from a WSDL or on a RESTful style Web service, or from the Page Definition.
Use this wizard when you expect a scalar result from the Web service. A Web service that looks up a stock price is a good example because the input is a stock symbol and the output is the scalar value price.

Creating a Form After Creating a Reference

To create a form after creating a Web Service Reference:
  1. Create the Web service reference. See "Creating a Web Service Reference Based on a WSDL", Creating a RESTful Web Service Reference , and Creating a Web Service Reference Manually.
  2. After the Web service references has been added, select Create Form 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 Identify 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 Items for Input Parameters:
    1. Identify which items to add. To include an item, select Yes in the Create column. Otherwise, select No.
    2. If necessary, edit the item label.
  6. For Items for Output Parameters (this step is bypassed for Manual style Web references):
    1. Identify which items need to be added. To include an item, select Yes in the Create column. Otherwise, select No.
    2. If necessary, edit the item label.
  7. 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.
  8. Click Finish.

Creating a Form by Adding a New Page

If you have an existing Web service reference, you can create form by adding a new page.
To create a form by adding a new page:
  1. Create the Web service reference. See "Creating a Web Service Reference Based on a WSDL", Creating a RESTful Web Service Reference , and Creating a Web Service Reference Manually.
  2. Create a new page.
    In the Create Page Wizard:
    1. Select Form.
    2. Select Form on Web Service.
  3. For Web Service Reference and Operation, select the Web service reference and operation (that is, the method to be executed). For RESTful style Web references, doREST will be selected automatically. The Operation option does not appear for Manual style Web references.
  4. For Identify 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 Items for Input Parameters:
    1. Identify which items need to be added. To include an item, select Yes in the Create column. Otherwise, select No.
    2. 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.
  6. For Items for Output Parameters (this step is bypassed for Manual style Web references):
    1. Identify which items need to be added. To include an item, select Yes in the Create column. Otherwise, select No.
    2. If necessary, edit the item label.
  7. Click Finish.

No comments:

Post a Comment