You create Web Services and operations that are used to get the
RESTful API requested mainframe data and to transform the data into objects.
Before you begin
Before creating a Web Service, you need to know the name of the virtual
table or virtual view that will be used to generate the SQL statement. You must also identify or
verify the Data Virtualization Manager server service provider URLs
to use to launch REST via z/OS Connect related actions (for details, see Setting REST z/OS Connect Web Services preferences).
Procedure
-
On the Server tab, expand .
-
Expand the Web Services directory where you want the Web Service to
reside and double-click Create Service.
-
On the Web Services page, enter a unique name for the new Web Service
and click Next.
-
To add a new operation to the Web Service, on the Web Service Operation
Type page, select Data Integration (REST via z/OS Connect or
SOAP) and click Next.
-
In the Browse SQL Metadata box, select the virtual table or virtual view
to use when generating the SQL statement and click Next.
-
On the SQL page, accept the default Name and
Description fields or enter a new name or description.
-
In the SQL Statement text box, accept or modify the SQL statement that
displays and click Next.
Note: RESTful URIs use GET operation for SELECT statements and
POST operation for INSERT, UPDATE, and DELETE statements.
-
In the SQL Inputs page, you can define the inputs to the SQL
statements.
-
On the SQL Results Set page, verify that the results are correct and
make any necessary modifications.
-
Click Finish.
The Web Service operation details display in the Web Service Operation
Editor. If necessary, modify the details in the editor.
-
To validate your Web Service complete the following:
- Right-click the operation in your new Web Service and select to synchronize your new Web Service with the service provider.
- Right-click the operation in your new Web Service and select to test the new Web Service in a web browser.
- Optional:
To test the Web Service, right-click the new operation or the new Web Service and click
Open in Tester. Choose one of the following test options:
- Default: use the default test settings.
- Create New: create a new test group that you can name and
configure.
- Select an existing test group.
- Optional:
To create a .sar file, on the Server tab, right-click on the Web Service
operation and click Create z/OS Connect SAR File(s). The file is saved to
your workspace and is available from the zOSConnect folder on the
Client tab.
You can use this SAR file to create a service and deploy it using integration platforms such as
IBM Explorer.
What to do next
To continue adding more operations under this Web Service group, click
Create New Operation and repeat the steps starting at step 5.