SOAP and REST

Simple Object Access Protocol (SOAP) and Representational State Transfer (REST) are two answers to the same question: how to access Web services.

SOAP is a standards-based Web services access protocol that has been around for a while and enjoys all of the benefits of long-term use. Originally developed by Microsoft, SOAP really isn’t as simple as the acronym would suggest.

REST is the newcomer to the block. It seeks to fix the problems with SOAP and provide a truly simple method of accessing Web services. However, sometimes SOAP is actually easier to use; sometimes REST has problems of its own. Both techniques have issues to consider when deciding which protocol to use.

SOAP is described by WSDL, and communicate using XML.

REST APIs are visited by URIs, and communicate using XML, HTML, or JSON, mostly JSON. REST APIs use POST, GET,PUT,DELETE methods of HTTP to manipulate the resource.


SOAP example:

REST example:


0 comments:

Post a Comment