REST vs SOAP

REST vs SOAP

In regards to the discussion on REST vs SOAP

SOAP (Simple Object Access Protocol)

Soap is an xml-based protocol designed for sending messages over the internet. It is a set of rules for an XML document as a request, and an XML document as a response. SOAP gives developers a vehicle to communicate data between servers regardless of their respective platforms. It is a highly recognized industry standard.

XML messages in a SOAP conversation use a wrapper known as an envelope. This adds a certain degree of overhead data that is transfered in every request and response. Additionaly, there is an added level of complexity when preparing and parsing a SOAP message because the message has to be extracted from the envelope.

REST (Representational State Transfer)

Rest is an architectural model that describes the allocation of resources over a network. An example of a working REST model is the internet itself or a website such as innovations.tv. When we talk about REST as related to XML web services, we are talking about using the existing internet model to create the web service using the http request and response as the vehicle. It is interesting to note that technically SOAP runs in a REST environment. However, a REST xml web service request is a standard http request and does not need a SOAP formatted post data message to communicate data.

It seems that the clear choice would be to use a simple REST based web service for the simple fact that we would be saving on overhead data and complexity. However, we can not discount SOAP completely as it provides a rigid protocal for making remote requests and it is widely used by developers who find the benefit of this structure to outweigh the overhead incurred. SOAP will inherently have many more tools and portability than any prepared XML based solely in REST.

Having said this, the RocketPanael CMS frame work is currently in a state which makes creating REST based services the more viable of the two and for this reason it that we should build our API`s fist using a simple REST architecture.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>