Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16813

(7.2.z) :read-resource operation of jax-rs subsystem doesn't handle all interfaces

XMLWordPrintable

      :read-resource operation of jax-rs subsystem doesn't handle interfaces, where end-point path is defined on interface

      Steps to reproduce:

      1. @Path("pure/proxy")
        public interface PureProxyApiService {
            @Path("test/{a}/{b}")
            @GET
            String test(@PathParam("a") String a, @PathParam("b") String b);
        }
        public class PureProxyEndPoint implements PureProxyApiService {
            @Override
            public String test(@PathParam("a") String a, @PathParam("b") String b) {
                return a + b;
            }
        }
        
      2. /deployment=DEPLOYMENT_NAME/subsystem=jaxrs:read-resource(recursive,include-runtime)
      3. Output:
                "org.resteasy.simple.deployment.PureProxyEndPoint" => {
                    "resource-class" => "org.resteasy.simple.deployment.PureProxyEndPoint",
                    "rest-resource-paths" => undefined,
                    "sub-resource-locators" => undefined
                }
        
      4. If class has @Path annotation, read-resource operation works correctly
      5. public interface ProxyApiService {
            @Path("test/{a}/{b}")
            @GET
            String test(@PathParam("a") String a, @PathParam("b") String b);
        }
        @Path("proxy")
        public class ProxyEndPoint implements ProxyApiService {
            @Override
            public String test(@PathParam("a") String a, @PathParam("b") String b) {
                return a + b;
            }
        }
        
      6.         "org.resteasy.simple.deployment.ProxyEndPoint" => {
                    "resource-class" => "org.resteasy.simple.deployment.ProxyEndPoint",
                    "rest-resource-paths" => [{
                        "resource-path" => "proxy/test/{a}/{b}",
                        "consumes" => undefined,
                        "produces" => undefined,
                        "java-method" => "java.lang.String org.resteasy.simple.deployment.ProxyEndPoint.test(@PathParam java.lang.String a, @PathParam java.lang.String b)",
                        "resource-methods" => ["GET /jaxrs-wf/proxy/test/{a}/{b}"]
                    }],
                    "sub-resource-locators" => undefined
                }
        

      cc rhn-engineering-lgao

              rhn-engineering-lgao Lin Gao
              rhn-engineering-lgao Lin Gao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified