port/path/to/application"). By default, the returned representation gleans the list of all attached {@link ServerResource} classes and calls {@link #getName()} to get the titleand {@link #getDescription()} the textual content of the WADL documentgenerated. This default behavior can be customized by overriding the {@link #getApplicationInfo(Request,Response)} method.
In case you want to customize the XSLT stylesheet, you can override the {@link #createWadlRepresentation(ApplicationInfo)} method and return aninstance of an {@link WadlRepresentation} subclass overriding the{@link WadlRepresentation#getHtmlRepresentation()} method.
In addition, this class can create an instance and configure it with an user-provided WADL/XML document. In this case, it creates a root {@link Router} and for each resource found in the WADL document, it tries toattach a {@link ServerResource} class to the router using its WADL path. Forthis, it looks up the qualified name of the {@link ServerResource} subclassusing the WADL's "id" attribute of the "resource" elements. This is the only Restlet specific convention on the original WADL document.
To attach an application configured in this way to an existing component, you can call the {@link #attachToComponent(Component)} or the{@link #attachToHost(VirtualHost)} methods. In this case, it uses the "base"attribute of the WADL "resources" element as the URI attachment path to the virtual host.
For the HTML description to work properly, you will certainly have to update your classpath with a recent version of
Apache Xalan XSLT engine (version 2.7.1 has been successfully tested). This is due to the
XSLT stylesheet bundled which relies on EXSLT features.
Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.
@author Jerome Louvel