• Post Reply Bookmark Topic Watch Topic
  • New Topic

Restful WebService gray area  RSS feed

 
gyank kannur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • 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.
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
That's the client's responsibility and a simple task scheduling framework would be sufficient for this purpose.
 
Laukik N. Desai
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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.
 
Anjaneya Reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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).
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!