Generate REST API from SOAP Backend

Rosen Silva
3 min readMar 21, 2022

This feature allows users to expose their legacy SOAP backends as REST APIs through WSO2 Enterprise Integrator. WSO2 Enterprise Integrator supports WSDL 1.1 based SOAP backends.

Follow the instructions below to generate REST APIs in WSO2 Enterprise Integrator for an existing SOAP backend.

Before you begin…Make sure that you have a valid WSDL URL from the SOAP backend. It should belong to the WSDL 1.1 version.

  1. Start WSO2 Integration Studio 8.1.0 or later

2. Create a new Integration Project

3. Right-click on the ESB Config project as shown in the below screenshot and select New REST API

4. Select the option ‘Generate REST API using WSDL’ and click Next

5. a) Create REST API using WSDL URL

  1. Give a name for the REST API
  2. Select ‘Generate REST API’ as ‘Using WSDL URL’
  3. Enter the WSDL URL
  4. Select the ESBConfig Project to save the REST API project
  5. Click Finish

5. b) Create REST API using WSDL File

  1. Give a name for the REST API
  2. Select ‘Generate REST API’ as ‘Using Local WSDL File’’
  3. Browse and give the WSDL File or a Zip file containing WSDL File
  4. Select the ESBConfig Project to save the REST API project
  5. Click Finish

6. You will see the generated REST API for the given WSDL Endpoint

Note: You can switch between Source View, Design View, and Swagger View of the created API to customize the auto-generated API

7. Running the created API

i) Right-click on the CompositeExporter project and select the ‘Export Artifacts and Run’

ii) Select all the artifacts and click Finish

iii) Invoke the “http://localhost:8290/CalculatorRESTAPI/1.0.0/add” URL with the following JSON Payload

{“add”: {“intA”: 4,“intB”: 2}}

iv) You should see a response as follows

{“addResponse”: {“value”: 6}}

--

--

Rosen Silva
Rosen Silva

Written by Rosen Silva

Associate Technical Lead @WSO2

No responses yet