Pageflow and Form Guide

CHAPTER 8

Web Service Pageflow Wizard

This chapter provides instructions for using the Web Service Pageflow Wizard. It contains the following sections:

 
Top of page

About the Web Service Pageflow Wizard

exteNd Director provides the Web Service Pageflow Wizard to help you create pageflows that execute Web Services.

After you use the wizard, you can run the generated pageflow right away. You can also use the Pageflow Modeler to make changes to the pageflow, just as you would with any other pageflow.

The Web Service Pageflow Wizard takes a Web Service Description Language (WSDL) file as input. With the information provided in the WSDL file, it generates a set of forms (XHTML pages that use XForms technology) as well as a pageflow process that ties the Web Service and the forms together into a simple application. This application provides a convenient and easy-to-use interface for invoking Web Service.

NOTE:   The Web Service Pageflow Wizard provides support for document-style WSDL files that contain a schema. However, you can create a pageflow that uses an RPC-style Web Service by using a Java activity.

For more information    For details on how to use an RPC-style Web Service in a pageflow, see Working with RPC-Style Web Services.

Example   The following example shows a typical Web Service pageflow for a service that takes an argument:

WebServicePageFlow

It includes an input form that allows the user to pass a parameter to the service. When the user submits the form, the service executes. Once the service has finished processing, the pageflow displays an output form that shows the data returned by the service.

The generated pageflow also includes a CheckPoint activity, which is placed just before the Web Service in the flow. When the page is refreshed (by the user clicking the Refresh button or taking an action on another portlet running on the same portal page), the engine tells the flow to go back to the CheckPoint activity and then execute the Web Service again.

NOTE:   To enhance performance in a page that includes several portlets, you may want to remove the CheckPoint activity so that the Web Service is not executed whenever the user refreshes the page or takes an action on another portlet within the page.

What the user sees at runtime   At runtime this pageflow would display an input form that allows the user to pass a parameter to the service:

WebServicePageFlowRuntime1

When the user submits the form, the service executes. Once the service has finished processing, the pageflow displays an output form that shows the data returned by the service:

WebServicePageFlowRuntime2

NOTE:   If you create a pageflow that executes a Web Service that does not take a parameter, the flow does not include the input form. At runtime the service executes and immediately displays the results of the operation in the output form.

A typical Web Service pageflow also includes a common help page, as well as an exception handler.

For more information    For background information on Web Services, see the chapter on Web Service basics in Utility Tools.

 
Top of page

Using the Web Service Pageflow Wizard

Procedure To create a Web Service pageflow process:

  1. With your project open in exteNd Director, select File>New.

  2. Click the Portlet tab.

  3. Select Web Service Pageflow and click OK:

    WebServicePageFlowWizard1

  4. Type a base name for the pageflow in the Base name field. This name is used as a prefix for the files that will be generated.

  5. In the WSDL file field, specify a path to the WSDL file that describes the service.

    If the file is located within the resource set, you can navigate to it by clicking the Resource Set button. If the file is located on the file system, you can find it by clicking the Browse button:

    WebServicePageFlowWizard2

  6. Click Next.

  7. Choose a Web Service, a port, and an operation and click Next:

    WebServicePageFlowWizard3

  8. Select the target resource set in the Select a resource set dropdown and click Next:

    ComposerPageFlowWizard3

  9. Specify how you want to format the controls on the generated forms as follows:

    ComposerPageFlowWizard4

  10. Click Finish.



Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...