Search code examples
javarestjerseyweblogicwadl

Where does Jersey store the "application.wadl" file?


I am trying to implement a code in our application which needs to monitor the existing registered resources in Jersey and then make decisions accordingly. I know that Jersey provides an application.wadl file which consists of all its resources at runtime.

My question is there a way to look at this file physically? Does Jersey create this file and store it somewhere in the app directory or is it in memory?

Is it possible to call any Jersey api internally on server to get the same info if this particular file is not available like that?

We are using the application class or runtimeconfig. Jersey auto discovers our resources marked with @Path annotation and we are running on Weblogic and Jersey 2.6.

Any help would be appreciated.

Thanks


Solution

  • No WADL file is created on disk. It is created dynamically upon URL request.

    http://[host]:[port]/[context_root]/[resource]/application.wadl

    E.g.:

    http://localhost:8080/rest-jersey/rest/application.wadl

    Also, I've found it very useful to inspect the WADL with the SoapUI tool, which can read your WADL from a URL and parse the resources into a tree format. See pic below.

    enter image description here