Expose SOAP services as RESTful APIs with Apigee

If you have got legacy applications written in WSDL or SOAP, and you are planning to expose it as a rest endpoint, Apigee seems to be a good option at the moment. Apigee is an option for converting your SOAP services to a RESTful API.

Objective

We will create a proxy for an existing SOAP backend using Apigee Edge proxy wizard. This feature is helpful to leverage existing SOA assets and quickly allow them for consumption for mobile and HTML5 web applications.

How Apigee Edge helps?

Apigee Edge uses a WSDL file to extract and convert the SOAP end-points to REST interfaces automatically using the SOAP import wizard. This allows developers to define the new service as a pass-through or expose the service as a RESTful service. You will be able to build two kinds of SOAP proxies in Apigee Edge. One of them generates a RESTful interface at the backend of SOAP service, and the other performs a "pass-through" of the SOAP message in the backend.

Implementation

Here we can see how to convert an existing SOAP interface to REST. The REST to SOAP to REST processes the WSDL to create a RESTful API proxy. Apigee Edge gets the input parameter and the service supported operations from the WSDL. Edge speculates which HTTP method to use for each of those operations. Edge then translates operations into GET requests, which have the benefit of being cacheable. Edge also sets a backend target endpoint, which can differ as per SOAP operation.

Technical overview

WSDL (which we want to expose as RESTful API):

Create a SOAP Proxy

Specify WSDL and Select Proxy Type:

REST endpoints exposed from the WSDL:

Viewing Query Parameters for REST Resources and Methods:

Converted above wsdl into RESTful API and providing query params as inputs for testing:

http://samradarakshan-eval- test.apigee.net/delayedstockquote/quote?StockSymbol=GOOG&LicenseKey=0

Migrating from SOAP to REST with Royal Cyber

Royal Cyber team of Apigee experts have explained the creation of a SOAP-to-REST API proxy using the API proxy wizard in Edge. However, if you want more fine-grained information and demo on this migration, you can email us at [email protected] or visit www.royalcyber.com.

Leave a Reply