Difference between REST and SOAP?

SOAP

  • SOAP stands for Simple Object Access Protocol.
  • SOAP is an application communication protocol.
  • SOAP is a format for sending and receiving messages.
  • SOAP is platform independent.
  • SOAP is an XML-based message protocol.
  • Uses WSDL for communication between consumer and provider.
  • Invokes services by calling the RPC method.
  • Does not return a human-readable result. 
  • The transfer is over HTTP. Also, uses other protocols such as SMTP, FTP, etc.
  • Javascript can call SOAP, but it is difficult to implement.
  • Performance is not great compared to REST.

REST

  • REST stands for REpresentational State Transfer.
  • REST is an architectural style protocol.
  • Uses XML or JSON to send and receive data.
  • Simply call services via URL path.
  • The result is readable which is just plain XML or JSON. 
  • The Transfer is over HTTP only.
  • Easy to call from javascript.
  • Performance is much better compared to SOAP, less CPU intensive, leaner code etc. 

Comments

Popular posts from this blog

How to Build REST API Using PHP

AVL Tree Rotations

Disjoint Set (Union-Find)