Proxy Services

A proxy service acts as a service hosted in the 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 hosted on the 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

In the navigator, under Manage/Service, click Proxy Services. The Add Proxy Service page appears.

add proxy image

Figure 1: Add Proxy Service

  1. At the Add Proxy Service page, you will see the General and Transport tabs.
  2. Enter the details on the General tab.
  3. General settings

    Figure 2: General Settings

  4. Next, enter the details on the Transport tab.
  5. Transport setting

    Figure 3: Transport Options

  6. Enter the service parameters and click Add Parameter.
  7. Click Next.You'll be redirected to Insequence and endpoints.
  8. Figure 4:In Sequence and endpoints options

  1. Click Next. The In-sequence options are displayed.
  2. Figure 5:In Sequence Options

  3. Select the in-sequence you want to add. If you select Anonymous,you have to add the sequence. Create your sequence using the Add Child option on the Design Sequence page.
  4. Figure 6: Adding Anonymous Sequence

  5. Click Save,to save the sequence.
  1. Go to the Endpoint options tab.
  2. Figure 7: Endpoint Options

  3. Select the endpoint you want to add. If you select Anonymous,you have to add the Endpoint. On the Manage Endpoints page, select the endpoint you want to add.
  1. Click Next. The Out Sequence and Fault Sequece options are displayed.
  2. Figure 8: End point options

  3. Select the out-sequence you want to add. If you select Anonymous,you have to add the sequence . Create your sequence using the Add Child option on the Design Sequence page.
  4. Figure 9: Out Sequencce options

  1. Go to the Fault-Sequence tab.
  2. Figure 10: Fault Sequence options

  3. Select the fault-sequence you want to add. If you select Anonymous,you have to add the sequence . Create your sequence using the Add Child option on the Design Sequence page.
  4. Click Finish.

You can view your service on the Deployed Services page.

For more information please refer to the WSO2 library