File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes java and restlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "java and restlet" Watch "java and restlet" New topic
Author

java and restlet

bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
does Java really need Restlet to communicate with REST?

is it worth learning and using it?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39530
    
  27
Need? No. For accessing resources over HTTP, you can use any other HTTP API, like the HttpURLConnection class, or the HttpClient library. I would imagine that the Restlet client API has some nice utility methods that make it easier, though.


Ping & DNS - updated with new look and Ping home screen widget
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
The other toolkit to look at is the open source Jersey project. This is the demo implementation of the JAX-RS (JSR-311) API and I suspect it is more likely to make it into standard Java than Restlet.


Bill

Java Resources at www.wbrogden.com
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
Restlet, Jersey, and JSR-311 (JAX-RS) are server-side frameworks for building RESTful web services. A (test) client emerged with Jersey - though more or less accidentally, that is not in response to JSR-311 (see com.sun.jersey.client.apache for an HttpClient backed version). Personally, I think that HttpClient is probably the best foundation for a client of a RESTful web service - especially as there don't seem to be any tools that consume WADLs to produce client-side proxies.

That being said Restlet does offer a org.restlet.Client class. This is mainly motivated by the desire to hide the standard java client/server class asymmetry (e.g. client-side HttpUrlConnection vs. server-side HttpServletRequest/HttpServletResponse) and replace it with a symmetry where both client and server use org.restlet.data.Request and org.restlet.data.Request.

To understand the relationship between Restlet and JSR-311 see Restlet API and JSR-311 API.


"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java and restlet
 
Similar Threads
Axis2 web service question
Restlet exception: NoSuchFieldError
What do I need to start developing REST apps ?
Regarding restlet web service.
JAX-WS and REST, anyone?