[Jersey-issues] [JIRA] Created: (JERSEY-1670) WADL is not correctly generated for resources with ambiguous templates. For example

  • From: "mfuksa (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [Jersey-issues] [JIRA] Created: (JERSEY-1670) WADL is not correctly generated for resources with ambiguous templates. For example
  • Date: Wed, 23 Jan 2013 18:12:53 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated

WADL is not correctly generated for resources with ambiguous templates. For 
example
-----------------------------------------------------------------------------------

                 Key: JERSEY-1670
                 URL: http://java.net/jira/browse/JERSEY-1670
             Project: jersey
          Issue Type: Bug
            Reporter: mfuksa
             Fix For: 2.0, 2.0-unplanned


See jerset e2e test, WadlResourceTest.testWadlForAmbiguousResourceTemplates() 
and testWadlForAmbiguousChildResourceTemplates (see TODO). 

Details:
Given these resources:

        @Path("{a}")
        public static class ResourceA {

            @GET
            public String getA() {
                return "a";
            }
        }

        @Path("{b}")
        public static class ResourceB {

            @POST
            public String postB(String str) {
                return "b";
            }
        }

request to "/foo":
final Response response = 
target().path("foo").request(MediaTypes.WADL).options();
does not return wadl containing both, GET and POST methods. Only method from 
one resource are involved. It should contain method from both resources {a} 
and {b}.

WADL currently generated:
<application xmlns="http://wadl.dev.java.net/2009/02";>
  <doc xmlns:jersey="http://jersey.java.net/" jersey:generatedBy="Jersey: ;
2.0-SNAPSHOT 2013-01-23 16:14:51"/>
  <grammars/>
  <resources base="http://localhost:9998/";>
    <resource path="foo">
      <method id="getA" name="GET">
        <response/>
      </method>
      <method id="apply" name="OPTIONS">
        <request>
          <representation mediaType="*/*"/>
        </request>
        <response>
          <representation mediaType="application/vnd.sun.wadl+xml"/>
        </response>
      </method>
      <method id="apply" name="OPTIONS">
        <request>
          <representation mediaType="*/*"/>
        </request>
        <response>
          <representation mediaType="text/plain"/>
        </response>
      </method>
      <method id="apply" name="OPTIONS">
        <request>
          <representation mediaType="*/*"/>
        </request>
        <response>
          <representation mediaType="*/*"/>
        </response>
      </method>
    </resource>
  </resources>
</application>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Jersey-issues] [JIRA] Created: (JERSEY-1670) WADL is not correctly generated for resources with ambiguous templates. For example

mfuksa (JIRA) 01/23/2013

[Jersey-issues] [JIRA] Updated: (JERSEY-1670) WADL is not correctly generated for resources with ambiguous templates. For example

mfuksa (JIRA) 01/23/2013

[Jersey-issues] [JIRA] Updated: (JERSEY-1670) WADL is not correctly generated for resources with ambiguous templates. For example

Pavel Bucek (JIRA) 01/29/2013
Terms of Use; Privacy Policy; Copyright ©2013-2015 (revision 20150226.965aeb8)
 
 
Close
loading
Please Confirm
Close