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

basic understanding around SOAP vs REST

alex russo
Greenhorn

Joined: Apr 19, 2012
Posts: 11
Hello All,

I am new to web services and trying to wrap my head around these two types.
I understand that SOAP is protocol based where as REST is an architectural style. SOAp uses XML for its envelope and REST can use XML and JSON's

My confusion/ gray area:

like in SOAP, we can view all the available web methods and there required parameters (to be passed) that are available using the ?WSDL (putting it at the end of the web service URL ). is there a similar way for REST web services.

if i want to see all the web services methods available under a service URL for RESTFUL services what should i be doing ?

another question: I was able to test the some of the web-services in soap using SoapUI however if i need to verify or test RestFul web-services what tool am i suppose to be using ?

any help in making this easier for me to understand is highly appreciated.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
See numbered notes:

alex russo wrote:I am new to web services and trying to wrap my head around these two types.
I understand that SOAP is protocol based where as REST is an architectural style. SOAp uses XML for its envelope and REST can use XML and JSON's (1)

My confusion/ gray area:

like in SOAP, we can view all the available web methods and there required parameters (to be passed) that are available using the ?WSDL (putting it at the end of the web service URL ). is there a similar way for REST web services. (2)

if i want to see all the web services methods available under a service URL for RESTFUL services what should i be doing ? (3)

another question: I was able to test the some of the web-services in soap using SoapUI however if i need to verify or test RestFul web-services what tool am i suppose to be using ?(4)

any help in making this easier for me to understand is highly appreciated.


1) REST has no limits on the type of resource served - could be anything = depends on the design of the system.
2) WADL is an attempt to create something like WSDL for REST but I don't think it is used much. A text description and example code are the best way to communicate what your RESTful service provides.
3) It is important to remember that REST has strict guidelines for what services HTTP methods address. See the wikipedia article or the many discussions in the ranch FAQ. It is up to the service provider to document functions.

SOAPui is only moderately useful since a RESTful service can return any type of resource, but if you are sticking to text like xml or json, sure. Pay particular attention to the request and response headers and HTTP methods.

Bill

MeghnaN Shah
Greenhorn

Joined: Jan 31, 2011
Posts: 9
Can anybody explain what are the significance between REST and SOAP and in which scenario we should use which service?

Stuart A. Burkett
Ranch Hand

Joined: May 30, 2012
Posts: 679
MeghnaN Shah wrote:Can anybody explain what are the significance between REST and SOAP and in which scenario we should use which service?


See that link in the third item of the post before yours ? Click it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: basic understanding around SOAP vs REST
 
Similar Threads
Why REST is called lighter weight Web Service?
JSP/HTML/Javascript/XML task: Need Consultation
Soap without web services
How does the browser and web service communicate using SOAP?
technology (JAX-RPC, Axis, SOAP, REST etc.) to implement web services ?