JAX_RS does not "merge" annotations between interfaces and classes. 
Either the jaxrs annotations are on the interface, or they are on the class.

On 1/29/2014 3:19 PM, Kristoffer Sjögren wrote:
> Hi
>
> Im trying to create a jaxrs client proxy from an interface that looks
> roughly like this.
>
> public interface SimpleService {
>     @GET
>     @Path("basic")
>     @Produces("text/plain")
>     String getBasic();
> }
>
> There is a service side implementation which is registered using the
> Application.getSingletons().
>
> @Path("/simple")
> public class SimpleJaxrs implements SimpleService {
>     String getBasic() { ... }
> }
>
> The problem is that @Path method annotations on the interface is not
> inherited to the implementation so method endpoints are never registered.
>
> 1) I don't want to put a @Path annotation on the interface because that
> is the address to find an implementation. Its an interface so I want to
> have any number of implementations, right?
>
> 2) I do want to have @Path annotations on interface methods because its
> part of the interface contract. Having @Path annotations on the
> implementation is redundant because it already implements the interface.
>
> Does this make sense? Is it possible to do?
>
> Cheers,
> -Kristoffer
>
>
>
> ------------------------------------------------------------------------------
> WatchGuard Dimension instantly turns raw network data into actionable
> security intelligence. It gives you real-time visual feedback on key
> security issues and trends.  Skip the complicated setup - simply import
> a virtual appliance and go from zero to informed in seconds.
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to