private void generateWADL(final Request baseRequest, final HttpServletResponse response) {
// TODO: implement HTTP caching
response.setStatus(HttpStatus.OK_200);
response.setContentType("application/vnd.sun.wadl+xml");
final Application app = new Application();
app.setGrammars(createWadlGrammars());
for (String catalogName : commandService.getCommandCatalogNames()) {
app.getResources().add(createWadlResources(catalogName));
}
try {
final JAXBContext wadlJaxbContext = JAXBContext.newInstance(Application.class.getPackage().getName());
final Marshaller marshaller = wadlJaxbContext.createMarshaller();