users@jersey.java.net

[Jersey] Re: Making client calls using server side resource interfaces

From: Guy Rouillier <guy.rouillier_at_gmail.com>
Date: Fri, 24 Aug 2012 22:51:59 -0400

On 8/24/2012 10:39 AM, James Shaw wrote:
> I'm not sure if this is something that's been considered (and perhaps
> rejected) before. Would be possible to generate proxy classes that
> implement resource interfaces, then use these interfaces to
> communicate with that resource? For example:

Yes, this already exists. Take a look at the Proxy Client here:
http://blog.alutam.com/2012/05/04/proxy-client-on-top-of-jax-rs-2-0-client-api/

I've used it and it works very well. If you use an IDE like Eclipse,
you can now have auto-complete on your client, just like you are making
local function calls.

-- 
Guy Rouillier