//
ApplicationDescription description = getApplication(info, detailedWadl);
WadlGenerator wadlGenerator = wadlGeneratorConfig.createWadlGenerator(serviceLocator);
Application application = new WadlBuilder(wadlGenerator, detailedWadl, info).generate(description, resource);
if (application == null) {
return null;
}
for (Resources resources : application.getResources()) {
resources.setBase(info.getBaseUri().toString());
}
// Attach any grammar we may have
attachExternalGrammar(application, description,
info.getRequestUri());
for (Resources resources : application.getResources()) {
final Resource r = resources.getResource().get(0);
r.setPath(info.getBaseUri().relativize(info.getAbsolutePath()).toString());
// remove path params since path is fixed at this point
r.getParam().clear();