aspose 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 Spring in Action this week in the Spring 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: 42286
    
  64
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 - my free Android networking tools app
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    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
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java and restlet