Set Web Service Context

Overview

The Set Web Service Context filter is used in a policy to determine the service to obtain resources from in the Web Service Repository. For example, by pointing this filter at a pre-configured getQuote service in the Web Service Repository, the policy knows to return the WSDL for this particular service when a WSDL request is received. The Return WSDL filter is used in conjunction with this filter to achieve this.

The Set Web Service Context filter is configured automatically when auto-generating a policy from a WSDL file and is not normally manually configured. For a detailed example, see the Web Service Repository tutorial.

Configuration

Name:

Enter a name for the filter in the Name: field.

Service WSDL:

Click the button on the right, and select a service definition (WSDL file) currently registered in the Web Service Repository from the tree. To register a Web Service, right-click the default Web Services node, and select Register Web Service. For more details on adding services to the Web Services Repository, see the Web Service Repository tutorial.

Monitoring:

The fields on this tab enable you to configure whether this Web Service stores usage metrics data to a database. This information can be used by API Gateway Analytics to produce reports showing how and who is calling this Web Service. The following monitoring options are available on this tab:

  • Monitor service usage:

    Select this option if you want to store message metrics for this Web Service.

  • Monitor service usage per client:

    Select this option if you want to generate reports monitoring which authenticated clients are calling which Web Services.

  • Monitor client usage:

    If you want to generate reports on authenticated clients, but are not interested in what Web Services they are calling, select this option and deselect the Monitoring service usage per client checkbox.

  • Which attribute is used to identify the client?:

    Enter the message attribute to use to identify authenticated clients. The default is authentication.subject.id, which stores the identifier of the authenticated user (for example, the username or user's X.509 Distinguished Name).

  • Composite Context:

    This setting enables you to select a service context as a composite context in which multiple service contexts are monitored during the processing of a message. This setting is not selected by default.

    For example, the API Gateway receives a message, and sends it to serviceA first, and then to serviceB. Monitoring is performed separately for each service by default. However, you can set a composite service context before serviceA and serviceB that includes both services. This composite service passes if both services complete successfully, and monitoring is also performed on the composite service context.