Home > Advanced Programming Techni... > Implementing Web Services > Invoking a Web Service as a...
Previous |
Next |
You can also implement a Web service as a process on the page. Running the process submits the request to the service provider. You can then display the request results in report.
To invoke a Web service as a process:
Create a page. See "Managing Pages in an Application".
In the Create Page Wizard:
Select Blank Page.
When prompted to use tabs, select No.
Navigate to the Page Definition. See "Accessing a Page Definition".
Under Page Rendering, Processes, click the Create icon.
From the process category, select Web Services.
Specify a process name, sequence, and processing point.
Select the Web service reference.
If the Web reference was created from a WSDL, perform the following additional steps.
Select the Web service reference and operation (that is, the method to be executed).
Define the process. You can store the results in a collection or in items on the page by selecting options under Web Service Output Parameters.
To store the results in a collection:
For Store Result in, select Collection.
Enter a name for the collection in the value field.
To store the results in items on the page:
For Store Result in, select Items.
Enter the appropriate items value in the fields provided.
Click Create Process.
To create a report in which to display Web Service request results:
Navigate to the Page Definition. See "Accessing a Page Definition".
Under Regions, click the Create icon.
The Create Region Wizard appears.
For the region type, select Report.
For the report implementation, select Report on collection containing Web service result.On Identify Region Attributes, enter a region title and optionally edit the region attributes.
Choose whether the Web reference was created manually or from a WSDL.
If the Web service reference was created from a WSDL:
For Web Service Reference and Operation, select a Web service reference and an operation (that is, the method to be executed).
For Result Tree to Report On, select the portion of the resulting XML document that contains the information you want to include in the report.
For Result Parameters:
In Temporary Result Set Name, enter a name for the collection that stores the Web service result.
Select and deselect the appropriate parameters.
If the Web service reference was created manually:
Select the Web service reference.
Choose the SOAP style.
Choose the message format.
Enter the XPath expression to the node to report on.
Enter the namespace for the SOAP response envelope and click Next.
Enter the name of the collection where the response message is stored.
Enter the names of the parameters that you want to be included in the report.
Click Create SQL Report.