Overview
|
You can use the Service Manager Web Services screen to register WSDL files in
the Web Services repository. This stores Web Service definitions and their related XML schemas.
Web Service clients can query the repository for the WSDL file, and use it to send messages to the
Web Service through the Enterprise Gateway.
When you register a WSDL file with the repository, the Enterprise Gateway exposes a virtualized
version of the Web Service. The host and port for the Web Service are changed dynamically
to point to the machine running the Enterprise Gateway. The client can then retrieve the WSDL for the
virtualized Web Service from the Enterprise Gateway, without knowing its real location. Some policies are also
automatically generated for the registered Web Service. These include resolvers and connection filters,
and are hidden by default in Service Manager.
You can also use the Web Services screen to perform tasks such as assigning
policies to a Web Service simply by dragging and dropping policies on to the Web Service.
|
Web Service groups
|
WSDL files are registered in Web Service groups, which provide a
convenient way of grouping related Web Service definitions.
You can register a WSDL file by right-clicking the default
Web Services group in the Web Service screen,
and selecting Register Web Service.
Alternatively, you can add a new Web Services group by right-clicking an existing group,
and selecting Add Web Services Group. You can also select
Add Web Services Root Group to add a top-level group.
To edit the Web Service group name (for example, the default New Web Services Group
name), double-click the group name in the Web Services tree.
|
Registering a Web Service
|
To register a Web Service, perform the following steps:
- Select a Web services group (for example, the default Web Services
group).
- Right-click, and select Register Web Service.
- In the Register Web Service dialog, specify the following fields:
WSDL URL |
The URL for the Web Service
(for example, http://www.example.com/services/myService.svc?WSDL) .
|
WSDL Connectivity Timeout |
The timeout when the Service Manager waits for a response, and the network
connection does not return (defaults to 60 seconds).
|
Web Service Deployment |
Where the Web Service is deployed (under the Default Service or Management Service relative paths).
|
- Click Register.
- Click Deploy if you wish to deploy the Web Service to the
Enterprise Gateway now.
The newly registered Web Service is displayed in the Edit Web Service section
below. There are no policies assigned yet in the Policies tab.
|
Accessing a virtualized Web Service
|
When you register a Web Service using the default settings, and deploy it to the Enterprise Gateway,
you can view its virtualized WSDL by clicking the link in the WSDL column on
the right. The published WSDL now uses the host and port of the Enterprise Gateway in its URL.
For example, if the Enterprise Gateway is running on a machine named services ,
the new URL on which the Web service is available to clients is:
http://services:8080/services/myService.svc?WSDL .
|
Assigning policies to a Web Service
|
You can assign policies to a Web Service by dragging and dropping, or copying and pasting, from the
Policies screen to the Web Services screen. All policies are
optional, and run at specified points during message processing.
For example, if your Web Service requires complex routing for security, you can assign a routing policy
to the Route interception point. If no policy is assigned to the Route
interception point, the message is forwarded to the Web Service using the URL defined in the
WSDL. You can assign policies to the following interception points:
Request |
The policy is run on the request received from the client.
|
Route |
The policy for routing the request to the Web Service.
|
Response |
The policy is run on the response from the Web Service before it is sent back to
the client.
|
Fault |
The policy for handling faults.
|
To assign policies to a Web Service, perform the following steps:
- In the Edit Web Service section, click the
Policies tab.
- Open the Policies screen.
- Drag and drop a policy (for example, XML Threat Policy) from the
Policies tree on to the appropriate icon in the diagram or in the table
(for example, Request).
- Repeat these steps to assign policies to other interception points.
- Click Deploy if you wish to deploy this configuration to the
Enterprise Gateway.
Assigning Policies to a Web Service
|
|
Removing an assigned policy
|
You can remove an assigned policy as follows:
- In the Policies tab, select an assigned policy in the table.
- Right-click, and select Remove policy from interception
point.
Alternatively, you can drag and drop a different policy to overwrite an assigned policy.
|
Editing a Web Service
|
When you have registered a Web Service, you can edit its details as follows:
- In the Web Services tree, select the Web Service to be edited.
- Right-click, and select Edit Web Service.
- In the Edit Web Service section, make your updates on the
appropriate tab.
|
Deleting a Web Service or group
|
You can delete a Web Service or Web Service group as follows:
- In the Web Services tree, select the Web Service
or group to be deleted.
- Right-click, and select Delete Web Service.
|
|