SOAP and REST question

Discussions

XML & Web services: SOAP and REST question

  1. SOAP and REST question (1 messages)

    Hello,

    I have been reading up on the differences between SOAP and REST. 

    I am getting the impression that SOAP would be used for a service that would invoke behavior, provide a contract and address interoperability through the use of XML.

    I am also getting the impression that REST is good for managing information with create, read, update and delete statements.  An individual resource can be indexed via a URL which can address security and caching much easier than a WSDL based SOAP Web Service.

    I am curious if there is anyone out there who has had to create a Web Service and split it into to two Web Services; one SOAP WS for invoking behavior and a separate REST WS for simply reading and updating a resource.

  2. SOAP and REST question[ Go to top ]

    Both serves the same purpose, be it invoke behaviour, create, update, read, etc. Both are interoperable (xml for soap, json, xml or plain text for rest).

    I tend to prefer rest services, as i find them simpler, quicker to implement/maintain, and most of the time we control both producer and consumer. SOAP is the way to go when you need a strong contract (you dont know your consumers), or when you absolutely need one of the many WS-* specifications.

    Splitting a web service should not be done based on the underlying technology, but on conceptual design only.