Integration

Soap Vs Rest | Difference between SOAP API and REST API



Out of several number of API's that a developer use to integrate Salesforce with external system SOAP and Rest are the most common.

The Simple Object Access Protocol (SOAP) 
The SOAP Webservices communicates using XML messages which consists of an envelope. This envelope consists of Header and body information which stores data in a structured format.
SOAP can be used to transfer huge data and considered slow as compared to REST.

The Representational State Transfer (REST)
Rest is an alternative to SOAP when the amount of data exchanged between application is less.
REST webservice applications use the HTTP build-in headers to carry meta information. It can perform basic operations as GET, POST, PUT and DELETE. Unlike SOAP the body of REST message can be JSON or XML. JSON is mostly preferred as it is light weight and therefore REST API's are most suited for mobile and web applications.

Quick Comparison Chart 
SOAP REST
Transports data in XML Transports data in XML or JSON
Highly structured Loosely Structured and light weight
Handles large data load and fit for large enterprise applications Handles less data and fit for mobile and web applications

About Saurabh Dua

3 comments:

  1. can u post some real time example(soap and Rest) && also provide some links which can provide service for testing purpose.

    ReplyDelete
    Replies
    1. Added two Articles covering creation of custom webservices and the process of testing them, Follow the link : http://www.worldofsalesforce.com/2016/05/creating-custom-webservice-in-salesforce.html

      Delete

Powered by Blogger.