Possible Duplicate:
Rest clients for Java?
If I want to use Java to create a REST client, what should I use?
Can i use CXF?
There is a Jersey client API that allows you to easily implement clients in Java
I used Restlet. I really liked it and wrote a blog post about my experience.
I've had success using HttpClient from Jakarta Commons.
Also Java comes with URLConnection but you might want to look at this comparison with HttpClient.
Apache CXF does support REST clients (see here) but seems like overkill (CXF is a general 'services' framework and therefore complicated with support for CORBA, SOAP etc.)
I tried using examples given in this ling http://cxf.apache.org/docs/jax-rs-client-api.html I faced the problem that the Interface or the Impl may not be always avilable to client side to generate proxy. I also tried wadl2java to see if clients are generated. CXF 2.6 version did not create client class.
I am happy with HTTPclient call till some concrete implementation changes ways to write client.
Note: We are using only CXF with Java thus only experimenting with CXF. other implementation may give different results
Use HTTP4e REST client add-on for Eclipse. It is simple to use and has Java/C#/Ruby/Flex/ActionScript/etc.. one click code generation.
imo there is hardly a need for a framework, simply use the servlet API and implement the request methods you need aka POST / GET / PUT / DELETE / HEAD
an example: http://www.exampledepot.com/egs/javax.servlet/com_mycompany_MyServlet.html
I think it really depends on the app and your environment, but I find resteasy really easy (since it is so declarative) and configurable. See chapter 30 for the client documentation.