SOAP vs. REST
- Posted by Tim Hsueh on July 21st, 2010 filed in Uncategorized
- Comment now »
In this blog, two of the most commonly used web service interfaces, SOAP and REST, will be discussed, detailing the advantages and the disadvantages of each interface and the well known companies who are using them.
- SOAP
SOAP stands for Simple Object Access Protocol. SOAP was originally designed by Microsoft employees Dave Winer, Don Box, Bob Atkinson, and Mohsen Al-Ghosein in 1998 as an object-access protocol project. The SOAP specification is currently maintained by the XML Protocol Working Group of the World Wide Web Consortium.
- The Advantages of SOAP
- SOAP allows the use of different transport protocols. The standard transport protocol is HTTP, but other protocols are also usable such JMS and SMTP.
- SOAP is able to tunnel in the HTTP get/response model without difficulty, it can tunnel easily over existing firewalls and proxies without modifications to the SOAP protocol. Also, it can use the existing infrastructure.
- The Disadvantages of SOAP
-Due to the verbose XML format, SOAP is considerably slower than competing middleware such as CORBA when sending large messages.
- HTTP have fixed roles for the interacting parties, only one party can use the services of the other, the developers must use polling instead of notification in these common cases.
- REST
- REST stands for REpresentational State Transfer. Just like SOAP it is a web service. It is a style of software architecture for distributed hypermedia systems such as the World Wide Web. The term REpresentational State Transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation. Fielding is one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification versions 1.0 and 1.1.
Conforming to the REST constraints is referred to as being ‘RESTful’.
The Advantages of REST
- One of the advantages of the REST is that it is lightweight compared to SOAP, that means it does not have a lot of XML markup.
- Another advantage of the REST is that the users can read the results easily.
- One of the other advantages of the REST is that it is very easy to build, it does not require any tool kits.
- The Disadvantages of REST
- One of the disadvantages of REST is that there might be some glitches when sending attachments compared to SOAP.
- Another disadvantage of REST is that the security for sending data is weaker than SOAP.
- Companies who are using SOAP and REST
- Many of the webservices on the Internet are using REST: Twitter, Yahoo’s webservices, Flickr and several others.
- On the other hand, one of the biggest users of SOAP is Google.
- There are also companies that use both, REST and SOAP, such as Amazon and eBay.
Leave a Comment