Popular Posts

Friday, January 27, 2017

REST & SOAP Web Service/API Difference / Comparison

Though difference between REST and SOAP web service is very old question, a updated detailed answer is always needed. Below notes help to understand which is better, and useful in different scenarios for design / development:

SOAP (Simple Object Access Protocol)
• To make applications communicate to each other (sending and receiving messages) over internet, over HTTP (it's supported by all browsers and servers) - SOAP was created.
• SOAP provides a standard way to communicate between applications running on different OS, with different technologies and languages.

• SOAP is an Application Communication PROTOCOL, which runs over a Transport Protocol
• SOAP is independent of transport protocol (could be HTTP, SMTP, FTP, TCP, UDP, even email)
• On HTTP (default SOAP transport protocol), only the POST verb is used
• SOAP is platform / language independent
• SOAP supports XML messages only
• Contract (WSDL) based system, Tightly coupled
• Action /Service oriented system (leads to Service Oriented Architecture)

• CXF, Metro, Kenai (RI), Axis, Spring WS

REST (Representational State Transfer)
• SOAP and REST can't be compared directly, since the first is a protocol and the second is an architectural style.
• Like SOAP, REST is also transport protocol independent. REST application can use any protocol for which there is an standardized URI scheme.
• REST makes full use of the specific features of that protocol (verbs GET, POST, PUT, DELETE, caching, stateless, predefined error codes – all are HTTP properties).

• Supports variety of format - JSON/XML/Plain HTML etc
• Loosely coupled, no contract needed
• Everything is just URL based
• REST is very lightweight (no heavy XML header/body needed)
• REST is data / resource oriented (leads to Resource Oriented Architecture)
• For a truly RESTFUL api, all RESTFUL Constraints (Client-Server, Stateless, Cache, Interface / Uniform Contract, Layered System, Code-On-Demand) should be followed

• CXF, Jersey (RI), RESTEasy, Spring RESTful

Designing REST API :


Unknown said...

myTectra Placement Portal is a Web based portal brings Potentials Employers and myTectra Candidates on a common platform for placement assistance

damion said...

701-100 dumps - The Best Studying Tools Available If you require help getting ready for an up and coming exam,

Kevin Davidson said...

It's very useful article with informative and insightful content and i had good experience with this information. We, at the CRS info solutions ,help candidates in acquiring certificates, master interview questions, and prepare brilliant resumes.Go through some helpful and rich content Salesforce Admin syllabus from learn in real time team. This Salesforce Development syllabus is 100% practical and highly worth reading. Recently i have gone through Salesforce Development syllabus and Salesforce Admin syllabus which includes Salesforce training in USA so practically designed.