There is huge difference between REST and SOAP. Comparing SOAP and REST is not just right as they are different things.
Both approaches work, both have advantages and disadvantages to interfacing to web services, but it is up to the web developer to make the decision of which approach may be best for each particular case.
|REST has no WSDL interface definition||SOAP has WSDL, which is an XML-based language for describing Web services and how to access them.|
|REST is over HTTP/HTTPS.||SOAP can be over any transport protocols such HTTP, FTP, STMP, JMS etc.|
|REST permits many different data formats – XML, plain text, JSON, HTML etc||where as SOAP only permits XML.|
|REST is much more lightweight and can be implemented using almost any tool, leading to lower bandwidth and shorter learning curve.||Using SOAP is little bit complex, It takes more time to learn and develop.|
|REST is limited by HTTP itself which can’t provide two-phase commit across distributed transactional resources,||But SOAP can.|
|REST services are easily cacheable.||Caching situations: If the information needs to be cached.|
|REST is almost always going to be faster.||SOAP Service is little bit slower.|
|No error handling||Built-in error handling (faults)|
|No constraints on the payload||Payload must comply with the SOAP schema|
Latest posts by Gopal Das (see all)
- Salesforce Certified Platform Developer I – Winter ’18 Release Exam - November 23, 2017
- Salesforce Certified Platform App Builder – Winter ’18 Release Exam - November 22, 2017
- Salesforce Certified Administrator – Winter’ 18 Release Exam - November 21, 2017