File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes REST and SOAP based Services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "REST and SOAP based Services" Watch "REST and SOAP based Services" New topic

REST and SOAP based Services

C Shinde
Ranch Hand

Joined: Oct 22, 2009
Posts: 60
Can someone guide me on what are the criteria's that I need to see to decide if I need to use REST based or SOAP based WebServices?

Thanks in advance.

Chetan Shinde
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
A basic question to ask is:
Can the web service you want to create be modeled as CRUD operations on one or more resources?
If the answer is yes, then RESTful web services are (probably) more suitable.
There are, of course, additional things to take into consideration, such as:
- Security requirements.
- Message delivery reliability.
- How do you want to provide information describing your service to clients.
- Data transfer format.
- Transport protocol.

The above is extremely compressed - it is much easier to discuss this if you give some hints about the scenario you are facing.
Best wishes!
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
A google search for "rest versus soap" will get you a huge number of hits to browse through.
C Shinde
Ranch Hand

Joined: Oct 22, 2009
Posts: 60
Thanks Ivan, but I did not have a scenario, it was just out of interest as that was a basic question anyone would ask in an interview, so I posted this query on the forum. I will think over some scenario based on your input and will get back.

Again thanks for your input! Have a nice weekend!
I agree. Here's the link:
subject: REST and SOAP based Services
jQuery in Action, 3rd edition