- SOAP Web Services are standard-based and supported by almost every software platform: They rely heavily in XML and have support for transactions, security, asynchronous messages and many other issues. It’s a pretty big and complicated standard, but covers almost every messaging situation. On the other side, RESTful services relies of HTTP protocol and verbs (GET, POST, PUT, DELETE) to interchange messages in any format, preferable JSON and XML. It’s a pretty simple and elegant architectural approach.
- As in every topic in the Java World, there are several libraries to build/consume Web Services. In the SOAP Side you have the JAX-WS standard and Apache Axis, and in REST you can use Restlets or Spring REST Facilities among other libraries.
With question 3, this article states that RESTful Services are appropiate in this scenarios:
- If you have limited bandwidth
- If your operations are stateless: No information is preserved from one invocation to the next one, and each request is treated independently.
- If your clients require caching.
While SOAP is the way to go when:
- If you require asynchronous processing
- If you need formal contract/Interfaces
- In your service operations are stateful: For example, you store information/data on a request and use that stored data on the next one.