Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2764

@RegisterProvider on a sub-resource

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.5.8.Final
    • None
    • Undefined

      I would like to register different Providers on different sub-resources but when I try it, it is not working (I get an exception regarding missing provider when the method on the sub-resource was called).

      Is it expected? I can't find any information neither in the MP specification nor Resteasy documentation.

      Resource proxy

      @Path("/foo")
      @RegisterProvider(XYZWriter.class)
      @RegisterProvider(XYZReader.class)
      public interface Foo {
          @POST
          @Consumes("xyz")
          @Produces("xyz")
          FooResponse get(FooContent content);
      
          @Path("/bar")
          Bar getBar();
      }

       Sub resource proxy

      @RegisterProvider(ABCReader.class)
      public interface Bar {
          @GET
          @Produces("abc")
          BarResponse get();
      }

      The call

      foo.getBar().get();

      Only registrations on the resource proxy are done.

            Unassigned Unassigned
            milankonzal Milan Konzal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: