M-1, thanks for your reply but I do not intend to write RESTful services. I just have to consume them and in the process I intend to write a wrapper Java class or Servlet (not sure?) that gets called for every request made to the actual REST API. Does this make it more clear ?Sorry if I was not clear enough before.
Main Topics
Browse All Topics





by: mwvisa1Posted on 2009-11-04 at 07:36:23ID: 25740351
jimmy282,
world.com/ community/ node/2300
ttp://java .sun.com/m ailers/tec htips/ente rprise/200 7/ TechTips _Nov07.htm l
The answer depends on if you are truly talking about *consuming* web service which would be client side (even if ultimately is a web site / service itself that feeds other clients), so yes that is really a POJO that can use http GET or POST and consume the result from the remote Restlet.
However, if you are creating a Restlet which the first part sounds like, then the choice between Servlet and actual RESTLet will depend on if you have an application server that can host restlets. If you don't then, simply use a Servlet and parse the values from the URL or Request object to simulate REST as you said implementing doGet(), doPost(), etc., accordingly.
Here are some references:
http://www.java
h
The first shows you HttpServlet approach.
M-1