Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can anyone tell the difference between SOAP and REST?

Tags:

rest

soap

I have the web service URL, login and password, but I can't understand is this SOAP or REST service.

I understand that SOAP is a protocol and REST is just an architecture, but I can't understand the difference between their mechanisms.

Thank you.

like image 720
Art Avatar asked Oct 20 '25 17:10

Art


2 Answers

SOAP is a set of W3C specifications for web services protocols. In simple terms, those protocols define an XML "wrapper" for providing and consuming web services.

REST is a different kind of concept (as you noted); Wikipedia defines it as an "architecture for distributed systems"; to web developers it's a convenient way of configuring URI schemes to retrieve and update resources. HTTP GET to server/customers/1 gets you info about customer 1, and HTTP PUT to the same URI updates that customer.

In colloquial terms REST is sort of a lightweight alternative to SOAP. Maybe you don't need all the headers, security, and schema that SOAP provides; or maybe you're working in a bandwidth-sensitive area (like mobile web), where you don't want all that overhead. REST is kind of the shorthand way of referring to that alternate paradigm, and tends to get lumped together with other techniques like JSON and AJAX, even though they aren't technically related.

like image 136
McGarnagle Avatar answered Oct 22 '25 13:10

McGarnagle


SOAP VS REST

SOAP is a protocol.
REST is an architectural style.

SOAP stands for Simple Object Access Protocol.  
REST stands for REpresentational State Transfer.

SOAP can't use REST because it is a protocol.   
REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.

SOAP uses services interfaces to expose the business logic. 
REST uses URI to expose business logic.

SOAP defines standards to be strictly followed. 
REST does not define too much standards like SOAP.

SOAP defines its own security.  
RESTful web services inherits security measures from the underlying transport.

SOAP permits XML data format only.  
REST permits different data format such as Plain text, HTML, XML, JSON etc.
like image 30
Avinash Kumar Avatar answered Oct 22 '25 13:10

Avinash Kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!