| Can you please provide difference between REST vs SOAP
Below are the most common difference between SOAP and REST
SOAP
(1)SOAP stands for Simple Object Access Protocol
(2)SOAP has features that it is language, plateform and transport are independent
(3)SOAP is a protocol
(4)SOAP cannot make use of REST since SOAP is a protocol and REST is an architectural pattern.
(5)SOAP is expensive as compare of REST
(6)SOAP requires more bandwidth as compare to REST. As we know SOAP Messages contain a lot of information inside of it, the amount of data transfer using SOAP is generally a lot.
(7)SOAP will work with XML format. As we seen from SOAP messages all the data passed is in XML format.
(8)Automation when used with certain language products
(9) SOAP was to ensure that programs built on different platforms and programming languages could exchange data in an easy manner
REST
(1)REST stands for Representational State Transfer
(2)REST requires uses of HTTP
(3)REST is an architectural pattern
(4)REST can make use of SOAP as the underlying protocol for web services, because in the end it is just an architectural pattern.
(5)REST is less expensive then SOAP
(6)REST does not need much bandwidth when we send requests to the server. REST messages consist of JSON messages. Below is example of a JSON message passed to a web server. Here size of the message is comparatively smaller to SOAP.
{"city":"Mumbai","state":"Maharastra"}
(7)In REST we have different data format such as Plain text, HTML, XML, JSON, etc. But the most preferred format is JSON.
(8)Closer to other web technologies in design philosophy
(9)A Restful service would use the normal HTTP verbs of GET, POST, PUT and DELETE for working with the required components. | | |