RESTifying SOAP Service Using Kumologica
Building a REST-based interface for your existing SOAP service and deploying as a serverless integration flow using Kumologica.
Join the DZone community and get the full member experience.Join For Free
SOAP (Simple Object Access Protocol) is a standards-based web services access protocol that has been ruling the integration world for a long time. SOAP-based web services were the de facto standard for SOA (Service Oriented Architecture). As the architecture moved from SOA to Microservices the enterprise started embracing the new philosophy from Roy Fielding, which we call today REST (Representational State Transfer). REST is an architectural style that relies on HTTP protocol without any support of higher level protocol like SOAP.
Below are major reasons for the popularity and motivation for moving from SOAP to REST:1. It was easy to represent any enterprise entity CRUD operations using REST principles as it uses HTTP protocol resource and methods.
Ex: CRUD operation on database table named “Customer” can be represented as GET /customer, PUT /customer, DELETE /customer.
2. REST is relying on HTTP protocol directly rather than having a higher-level protocol on top of it (like in the case of SOAP). This reduces the network footprint during service invocation.
Ex: For retrieving “customer” data from a database we use GET /customer/<<customerid>> whereas in the case of SOAP, we need a SOAP XML payload, which is sent to the server as HTTP POST call.
3. SOAP can only work with XML whereas REST standard permits different data formats such as Plain text, HTML, XML, JSON, etc.
SaaS or cloud-native-based platforms mostly use REST endpoints as the standard interfacing mechanism, be it for exposing the product features, or for enabling webhooks based integration. In order for integrating these platforms with the legacy systems running on enterprises that use SOAP-based interfaces, it becomes difficult and hence we need RESTify the existing SOAP services.
In this article, we will show you how easy it is to RESTify your SOAP service using Kumologica.
We have SOAP based calculator web service hosted by a third party service provider (http://www.dneonline.com/calculator.asmx?WSDL). The service provides add, divide, multiply, and subtract operations. This service needs to be RESTified for client consumption. The REST operations should be represented as given below.
Opinions expressed by DZone contributors are their own.