This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes SOAP vs RESTFul Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "SOAP vs RESTFul" Watch "SOAP vs RESTFul" New topic
Author

SOAP vs RESTFul

Rakesh Basani
Ranch Hand

Joined: Jun 04, 2012
Posts: 38
Hi guys..

I am really confusing with web services SOAP and RESTFul.. Which one is better to use..
Following are the points I have inferred from the articles I read on webservices..

1. SOAP uses WSDL but RESTFul doesn't
2. SOAP communicates using XML language.. But RESTFul can communicate with XML,JSON,pure http,other user defined ones..
3. SOAP uses SOAP envelop for sending request and recieving response
4. SOAP supports HTTP,FTP and other protocols.. But RESTFul supports only HTTP
5. RESTFul is faster than SOAP
6. In real view RESTFul is just a webapplication developed with some specialized annotations.. But SOAP is not a web-app
7. With SOAP we can explain about our webservices to the client very well (through WSDL).. But client need to have good view on RESTful webservices before using it..


Please correct me if I wrong (mention point number)..

Thanks in advance..
Peter Kovac
Ranch Hand

Joined: Aug 08, 2010
Posts: 41
Rakesh Basani wrote:Hi guys..
I am really confusing with web services SOAP and RESTFul.. Which one is better to use..

It depends on what you want to achieve.

SOAP is usually considered "heavyweight" supporting many advanced features (transactions, security, etc.) but it might be an overkill for some/most applications.

Rakesh Basani wrote:Hi guys..
1. SOAP uses WSDL but RESTFul doesn't

There's WADL for RESTful web services, if you need.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35239
    
    7
Lots of good introductory and comparative material at http://www.coderanch.com/how-to/java/WebServicesFaq


Android appsImageJ pluginsJava web charts
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4422
    
    2

Is this a homework question? or are you trying to decide which to use in a real project?

SOAP is totally misnamed. It originally meant Simple Object Access Protocol

Its anything but simple. And its all about web-services, which is really remote object invocation. 99% of all sane engineers avoid remote object invocation.
Rakesh Basani
Ranch Hand

Joined: Jun 04, 2012
Posts: 38
Thnaks for your replies guys..

@Peter : Is this a homework question? or are you trying to decide which to use in a real project? in a real project?


No.. I am using it in real project.. I am developing my webservices in java.. .NET people will use those services..

Can anyone explain me how other lanquages people will use my webservices (example .NET)..


Thanks in advance..
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4422
    
    2

REST is easy. You write a servlet or bean/jsp and run it in a container such as Tomcat, Glassfish, JBoss or whatever you like

You define message that the .NET or other user uses standard HTTP protocol and does GET and POST actions.

You reply with a response message.

No need for any complex remote invocation. No remote objects. Just send messages in text/String format.

I can build a complete REST application in a day. Using SOAP, WSDL and all the rest, will take months.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: SOAP vs RESTFul
 
Similar Threads
How to use XML Schema within RESTful Webservices
RESTful Web Services:About the book
How to use java to invoke an external webservices (soap, soap1.2)?
Authentication in Webservices