Monday, July 1, 2019

API Testing 03: SOAP vs REST web services

We have two types web services, Simple Object Access protocol (SOAP) and Representational State Transfer (REST) web services.

Both SOAP and REST are meant for the same purpose, but how they work and what they use for communication to happen differentiates them. Lets understand them in detailed.

Simple Object Access Protocol (SOAP): It is a protocol, and it is originally developed by Microsoft to access the web services. SOAP uses XML messaging system over HTTP with some specification which could be understood across all applications.

The web services developed using SOAP protocol are called SOAP web services. SOAP only works with XML format messaging.

SOAP service includes WSDL file, which provides the information about what the web service does and location of the web service. Thus SOAP requires more  bandwidth for message transfer as it includes lot of information.

Representational State transfer Protocol (REST): is a architecture style, and it uses HTTP protocol for web services. REST supports different data formats JSON, HTML, XML, Text and etc. as messaging system, but JSON is the most preferred format.

The web services designed using REST architecture style are called RESTful web services. REST architecture style is used for building the web services that are lightweight, maintainable and scalable in nature.

And a RESTful service uses HTTP methods GET, POST, PUT and DELETE for working with required components.

REST doesn't require much bandwidth when request sent to server. REST messages mostly consists of JSON format, the message size smaller compared to SOAP messages size.

Thanks for reading. Hope this post helped you to understand the basic differences between SOAP and RESTful web services.

#HappyLearning #HappyTesting

No comments:

Post a Comment

Selenium4: Working with two parallel windows in Selenium Automation

A new method newWindow() is introduced in Selenium 4 (Alpha). Using this method we can open a new tab or new window from the current window...