Managing Web Services

Contents

Overview

You can use the Web Services screen in Service Manager 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 by dragging and dropping from the Policies screen 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, and edit the name on the Settings tab below.

Registering a Web Service

To register a Web Service, perform the following steps:

  1. Select a Web services group (for example, the default Web Services group).
  2. Right-click, and select Register Web Service.
  3. 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 Services relative path).

  4. Click Register.
  5. 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.

Note:
You must first deploy the newly registered Web Service before you can view its virtualized WSDL.

Assigning Policies to a Web Service

You can assign policies to a Web Service by dragging and dropping 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 Policy is run on the request received from the client.
Route Policy for routing the request to the Web Service.
Response Policy is run on the response from the Web Service before it is sent back to the client.
Fault Policy for handling faults.

To assign policies to a Web Service, perform the following steps:

  1. In the Edit Web Service section, click the Policies tab.
  2. Open the Policies screen.
  3. 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).
  4. Repeat these steps to assign policies to other interception points.
  5. Click Deploy if you wish to deploy this configuration to the Enterprise Gateway.

Assigning Policies to a Web Service

Assigning Policies to a Web Service

Removing an Assigned Policy

You can remove an assigned policy as follows:

  1. In the Policies tab, select an assigned policy in the table.
  2. 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:

  1. In the Web Services tree, select the Web Service to be edited.
  2. Right-click, and select Edit Web Service.
  3. 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:

  1. In the Web Services tree, select the Web Service or group to be deleted.
  2. Right-click, and select Delete Web Service.