"This page describes how you can get an extended WADL from your REST app. It aligns mostly with the extended-wadl-webapp sample and uses these features:
Add additional doc tags to the WADL
Create JAXB beans from xsd - you might also create the schema from your beans
Add the grammars element that includes the xsd file from which JAXB beans were generated to the WADL
Add javadoc from your resource classes to the WADL, using most of the supported javadoc tags
For getting the extended WADL as described above these things have to be done:
Configure the maven-jaxb-plugin to create JAXB beans from xsd - this is described here just to describe what's done in the sample.
Add the application-doc.xml and application-grammars.xml to the build classpath
Configure the maven-javadoc-plugin with the ResourceDoclet provided by the wadl-resourcedoc-doclet artifact to create the resource-doc.xml.
Create a subclass of WadlGeneratorConfig that defines/configures the WadlGenerators to use
Specify your custom WadlGeneratorConfig in the web.xml as the WadlGeneratorConfig"
"Out of the box Jersey generates basic WADL at runtime that you can obtain from your REST app via GET http://path.to.your/restapp/application.wadl. Additionally you can configure Jersey to create an extended WADL including e.g. additional doc elements or javadoc read from your resource classes: There's a custom doclet that writes your javadoc to a file so that it can be used to extend the WADL. Additionally there's the maven-wadl-plugin that allows you to create the WADL without your running REST app."
"So, we are going to look at a restful webservice that is going to generate XML. As you might know, we have the perfect JSR specification for that in the form of JAXB. The needed libraries are already available in Netbeans 6.8. And as you might have guessed, returning JAXB objects from a JAX-RS method is going to integrate naturally and take some strain from our shoulders. No need to marshal and unmarshal by ourself. "