1

There are number of resources available on line, but I would like to hear a clear idea, on how we can differentiate a service as SOAP/REST by looking at service design? (not with wsdl/wadl)

How they differ in the architecture?

thecoshman
  • 8,394
  • 8
  • 55
  • 77
Ratha
  • 9,434
  • 17
  • 85
  • 163
  • 1
    possible duplicate of [Representational state transfer (REST) and Simple Object Access Protocol (SOAP)](http://stackoverflow.com/questions/209905/representational-state-transfer-rest-and-simple-object-access-protocol-soap) – inf3rno Oct 07 '14 at 13:50

1 Answers1

2

As an experienced user, you have probably read all the technical answers to similar questions already, such as this and this, so I will try a different kind of answer, a more metaphorical one.

Indeed, we can rephrase the REST vs SOAP debate, by looking at what is the main notion for each of them:

  • SOAP is about sending messages through a post office box, whatever the application domain is. The most important thing is that the envelope is valid. The other aspects (body of the message, location and number of "post offices", way to send it to the box) are secondary.
  • REST is about doing things with resources (aka "stuff" that can be identified in your application domain). Because the actions are generic (create, read, update, delete), the most important things is the identification of resources (URIs), and their representation (in XML, JSON or whatever format).

As an example, let's consider a book delivery service:

  • a SOAP version could provide a service endpoint to send:
    • book search requests
    • book detail requests
    • book order requests
    • book order cancellation requests
    • book order status requests
    • book invoice requests
  • a REST version would provide linked representations of:
    • lists of books
    • details of a book
    • orders/invoices of books

With SOAP, you are defining endpoints for actions. With REST, you provide endpoints for things.

Community
  • 1
  • 1
Aurélien Bénel
  • 3,775
  • 24
  • 45
  • Not sure why is Aurelien's answer is accepted. All the actions mentioned under SOAP can be performed using REST too just the implementation would be different. This post does not answer the question in any way. – AwsAnurag Nov 12 '20 at 15:58