Creating a Proxy Service
You can create a new proxy service or import an existing proxy service from an XML file, such as a Synapse configuration file using WSO2 Integration Studio.
Prerequisites
You need to have WSO2 Integration Studio installed to create a new proxy service or to import an existing proxy service. For instructions on installing WSO2 Integration Studio, see Installing WSO2 Integration Studio.
Step 1: Creating a new proxy service
Following sections describe how you can create a new proxy service.
Open WSO2 Integration Studio and click ESB Project → Create New in the Getting Started tab as shown below.
Enter a project name and click Finish.
Right-click the SampleServices project in the navigator and go to New → Proxy Service to open the New Proxy Service dialog.
Select Create New Proxy Service and click Next.
Type a unique name for the proxy service, and select a proxy service template from the list shown below. These templates will automatically generate the mediation flow that is required for each use case.
The use cases covered by each template are explained below.
In the Save in field, enter the project folder where the proxy service should be saved.
Click Finish. The proxy service is created in the src/main/synapse-config/proxy-services folder under the project you specified, and the proxy service appears in the editor. Click its icon in the editor to view its properties.
You also have the option of using the management console to create proxy services: Click the Main tab on the management console, go to Manage -> Services -> Add, and then click Proxy Service. The Create Proxy Service from Template screen appears.
Step 2: Update the mediation flow in the proxy service
Once you have created a proxy service file as explained above, you can update the mediation flow by adding new mediation artifacts and changing the existing artifacts (which were generated for the template you selected).
First, open the proxy service configuration file from the project explorer.
You can use either the design view or the source view to update the mediation flow. Shown below is an example of a PassThrough proxy service:
Step 3: Deploying the proxy service in the ESB server
Once you have added the security policy to your proxy service as explained in the previous topics, you need to create a Composite Application project with a CAR file. You can then deploy the CAR file in the ESB server:
Right-click the Project Explorer and click New > Project.
From the window that opens, click Composite Application Project.
Give a name to the Composite Application project and select the projects that you need to group into your C-App from the list of available projects. You need to select the ESB project, which contains the proxy service and security policy file respectively.