Application Express User's Guide > Advanced Programming Techni... > Implementing Web Services > Invoking a Web Service as a...
Invoking a Web Service as a Process |
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 new page. See "Adding Pages to an Application".
In the Create Page Wizard:
Select Blank Page.
When prompted to use tabs, select No.
Navigate to the Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
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 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:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
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.
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.
Click Create SQL Report.