This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When using Jax-RS in a web project, Netbeans discovers services and methods that are annotated. This allows to browse HTTP MEthods and Subresource Locators in the RESTful Web Services section which is great as I can next open and test them. In a project I usually create Service Interface in order to share interface between REST client and server. For Example: @Path("customer") public interface CustomerRestServiceInterface { @DELETE @Path("{id}") public void remove(@PathParam("id") Long id); @GET @Path("{id}") @Produces({"application/xml", "application/json"}) public Customer find(@PathParam("id") Long id); @GET @Produces({"application/xml", "application/json"}) public List<Customer> findAll(); } And then I implement Service Bean on the server side: @Stateless public class CustomerRestServiceBean implements CustomerRestServiceInterface { @Inject private CustomerDao dao; @Override public void remove(Long id) { dao.remove(dao.find(id)); } @Override public Customer find(Long id) { return dao.find(id); } @Override public List<Customer> findAll() { return dao.findAll(); } } Then unfortunately in the RESTful Web Services browser I don't see any node for implemented `customer` web service. Properly it should display a real resource hierarchy that is hosted: +RESTful Web Services | +CustomerRestServiceBean [customer] | + HTTP Methods | | | + remove(): void | + find(): Customer | + findAll(): List<Customer> | + Subresource Locators
That's interresting. In fact, such a construction is possible.
The JAX-RS 2.0 specification says (3.6): =============================================== JAX-RS annotations may be used on the methods and method parameters of a super-class or an implemented interface. Such annotations are inherited by a corresponding sub-class or implementation class method provided that the method and its parameters do not have any JAX-RS annotations of their own. Annotations on a super-class take precedence over those on an implemented interface. The precedence over conflicting annotations defined in multiple implemented interfaces is implementation specific. Note that inheritance of class or interface annotations is not supported. If a subclass or implementation method has any JAX-RS annotations then all of the annotations on the superclass or interface method are ignored. ============================================== The JAX-RS implementation should guarantee the method annotation inheritence, but not the class annotation inheritence, so the @Path annotation, from the example, applied onto the interface, isn't guaranteed to work : @Path("customer") public interface CustomerRestServiceInterface Anyway, Netbeans should support the specification (method annotations inheritence).
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss