Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Help with Jersey auto-generation of WADL

Tags:

jersey

wadl

As described here: http://wikis.sun.com/display/Jersey/WADL

I'm using Jersey 1.4 in Tomcat 6.

I have tried every possible URI with a "/application.wadl" and all I get is a 404 (not available). I'm obviously not understanding something, but every blog I read makes it sound like this is "out of the box" functionality. I'm using Tomcat 6..should this matter?

I was able to use Pavel's example on using the WadlResource object here, but it seems I shouldn't need to do this: http://markmail.org/message/lbeaw5vyr4qergdd#query:+page:1+mid:fo4dt7tbd6rb3gvi+state:results

thanks.

like image 215
ChrisO Avatar asked Jan 21 '23 10:01

ChrisO


2 Answers

I think that ChrisO most likely has the answer in that your wadl would be available at http://localhost:{port}/{warname}/application.wadl

like image 91
Ben Mathews Avatar answered Jan 23 '23 00:01

Ben Mathews


I had the same problem, and found out that default application.wadl was only working when configured at the root of the app

My conf included several url patterns like the following

  <filter-mapping>
    <filter-name>jersey-spring</filter-name>
    <url-pattern>/admin/rest/*</url-pattern>
  </filter-mapping>

And I had to add this to make it work :

  <filter-mapping>
       <filter-name>jersey-spring</filter-name>
       <url-pattern>/application.wadl</url-pattern>
  </filter-mapping>

Hope it helps

like image 38
Samuel EUSTACHI Avatar answered Jan 22 '23 23:01

Samuel EUSTACHI