aspose file tools*
The moose likes Web Services and the fly likes REST vs SOAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "REST vs SOAP" Watch "REST vs SOAP" New topic
Author

REST vs SOAP

Krishna Natarajan
Greenhorn

Joined: Oct 18, 2006
Posts: 5
Hi,
I read that REST is another standard like SOAP, but is much easier to code. Could you please summarize the differences and when to which.

Thanks
Sam Ruby
author
Greenhorn

Joined: Jul 23, 2003
Posts: 13
REST is what you used to POST your comment on javaranch, and what you are using now to GET my response.

In web terms, SOAP is an protocol designed to be invisible to the web, you can't simply copy/paste a SOAP URL into an IM session or into a mashup.

Which is easier to program to depends on what tools you are using. In some environments, producing a WSDL file is a mouse click, and consuming that same WSDL file is another mouse click.

The downside is that such interfaces tend to be brittle, and often end up being inadvertently vendor specific -- due to the wide variety of options that WSDL supports, and the various subsets that each individual vendor choses to implement.

By contrast, coding methods like GET and POST are just about as easy in pretty much every programming language with the right toolkit; but they don't parse the datastream. What we have found is that using tools for parsing html or using XPATH does the job in most cases, and doesn't create inadvertent vendor lockin issues and keeps your code resilient from most data format changes.


Sam Ruby
Zander Sinner
Greenhorn

Joined: Apr 02, 2010
Posts: 1
Krishna Natarajan wrote:Hi,
I read that REST is another standard like SOAP, but is much easier to code. Could you please summarize the differences and when to which.

Thanks

The main advantages of REST web services are:

* Lightweight – not a lot of extra xml markup
* Human Readable Results
* Easy to build – no toolkits required

SOAP also has some advantages:

* Easy to consume – sometimes
* Rigid – type checking, adheres to a contract
* Development tools



via SOAP vs. REST
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: REST vs SOAP