The example shows, how to generate a customized WADL for your application offline (without a running jersey app).
Build the project, generate the resourcedoc.xml
with javadoc and generate the wadl file:
$ mvn compile javadoc:javadoc com.sun.jersey.contribs:maven-wadl-plugin:generate
Afterwards have a look at the target/classes/application.wadl
and at these artifacts:
pom.xml
src/main/java/com/sun/jersey/samples/generatewadl/resources/ItemsResource.java
src/main/java/com/sun/jersey/samples/generatewadl/util/ExampleDocProcessor.java
resourcedoc.xml
.
An "@example.tag" can be found at ItemsResource.createItem
src/main/java/com/sun/jersey/samples/generatewadl/util/ExampleWadlGenerator
resourcedoc.xml
can be processed by this WadlGenerator and used to extend the generated application.wadl
If you're on unix and have xsltproc installed you can simply run mvn package
$ mvn package
and afterwards have a look at the generated target/application.html