Proxy Services

A proxy service acts as a service hosted in WSO2 ESB, and typically fronts an existing service endpoint. A proxy service can be created and exposed on a different transport, schema, WSDL, or QoS (such as WS-Security, WS-Reliable Messaging) other than the real service. It can mediate the messages before they are delivered to the actual endpoint, and the responses before they reach the client.

Clients can send requests for proxy services directly to the ESB, as the client sees it as a service hosted on WSO2 ESB. For example it can perform the ?wsdl function and view the WSDL of the virtual proxy service. In the ESB configuration, such requests can be handled anyway you like. You can process the message and send it to the actual service, probably running on a different computer, but it is not necessary to always send the message to the actual service. You can list a combination of tasks to be performed on the messages received for the proxy service, and terminate the flow or send a message back to the client even without sending it to the actual service.

Adding a Proxy Service

From the left navigation menu, select Proxy Service under Manage > Services > Add. This will take you to the Create Proxy Service from Template page.

add proxy image

Figure 1: Select Proxy Service Template

Select a template that suits your mediation requirements. If you are looking to create an advanced proxy service or if none of the available templates matches your requirements, select the Custom Proxy option at the end of the templates list. This will launch the proxy service creation wizard which enables you to customize all aspects of the proxy service including the sequences, endpoints, transport settings, WSDL options and other QoS settings.

The Create Proxy Service from Template page provides you the following set of built-in templates for creating and setting up proxy services easily and quickly.

For an example if you wish to expose an existing service with WS-Security you can choose the Secure Proxy option to create a proxy service with WS-Security enabled with a specified security policy. If you are implementing a scenario where an existing service is exposed over a different schema (message format) you can make use of the Transformer Proxy option to easily setup a proxy service which can transform requests and responses based on specified XSLT configurations.

transformer proxy

Figure 2: Transformer Proxy Template

Each template will show a limited set of controls which allows the user to easily setup a proxy service. On successfully creating a proxy service the user will be directed to the Deployed Services page.