A recent project requires me to build a RESTful service that supports supports stream input, output and JAXB binding. After a quick research, I was amazed when I found how easy it is to build RESTful service using JAX-WS(JSR-311) and Apache CXF . Cut the chase, let the code talk. import javax.xml.ws.rs.*; @Path( "/hello" ) public interface Greeter { @GET @Path( "/{user}") @Produces( "text/plain" ) public String sayHelloTo( @PathParam( "user" )String userName ); } It seems the annotations in the interface above provides everything client needs to know, and that's exactly right. Following CXF class returns an implementation of Greeter that knows to send HTTP request to http://helloworld.com/hello/jiaqi and return the HTML response as a String. There's zero coding work involved to create fully functional client. import org.apache.cxf.jaxrs.client.JAXRSClientFactory; ... Greeter greeter = JAXRSClientFactory.create( "http://hel
I'm almost certain you will not find anything useful here in this blog.