• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Restful WebService gray area

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to understand if Restful WS needs any webserver or using a servlet internally or just plain pojos. As I understand for a soap ws, it uses a servlet and therefore needs a webserver. If someone can shed some light.
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you'll need some kind of server-side component to handle the incoming HTTP request, act upon the request method, message body and query string/parameters and to formulate and send the HTTP response back to the caller.
In Java terms the most basic lightweight Servlet container will suffice. Like Jetty, which you could even embed in your application.
 
gyank kannur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply. Again trying to compare SOAP with REST, i read that SOAP ws have callbacks and it is NOT possible with REST!! If this is a case then Rest would be a big drawback.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For exhaustive discussions of REST versus SOAP, see the ranch FAQ on web services.

Not sure what you mean by "callbacks" - both SOAP and REST are based on request - response dynamics - without a request, nothing happens.

Bill
 
gyank kannur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did go through the links and in one of those articles http://www.ibm.com/developerworks/webservices/library/ws-asynch3/ they mentioned about defining the callback mechanism. I would want to know if this is possible with REST.
 
gyank kannur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To elaborate more about what i meant about callbacks: say a client is trying to access a Restful webservice which is currently down,then the immediate response would be an error code like 500 but incase of callbacks the client would try to automatically create a new request after a particular timeframe.
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's the client's responsibility and a simple task scheduling framework would be sufficient for this purpose.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, It requires web server since REST is based on http methods and uses HTTP as transport and protocol. in SOAP, it uses SOAP as protocol and HTTP as transport.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, To execute the REST web service need Web/Application server. Please find the few point on Restful web service.

1. It is protocol specific ,i.e. it only supports the HTTP protocol.
2. It supports only SSL security.
3. It will provide different format response i.e. XML,JSON,txt etc..
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anjaneya Reddy wrote:Yes, To execute the REST web service need Web/Application server. Please find the few point on Restful web service.

1. It is protocol specific ,i.e. it only supports the HTTP protocol.
2. It supports only SSL security.
3. It will provide different format response i.e. XML,JSON,txt etc..



1. Although it is certainly true that the HTTP protocol is most commonly used, REST is actually protocol agnostic.
2. I don't see why security would be mandatory or restricted to SSL.
 
Anjaneya Reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regarding question on security.

There are some situation,To accesses the Secured (HTTPS) REST web service,we need a certificate to access it.

To avoiding the secured data tampering. We need to pass private certificate through SSL(Secured Socket layer).
 
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic