final ResourceConfig rc = new ResourceConfig(WidgetsResource.class, ExtraResource.class);
rc.property(ServerProperties.WADL_GENERATOR_CONFIG, MyWadlGeneratorConfig.class.getName());
final ApplicationHandler applicationHandler = new ApplicationHandler(rc);
final ContainerResponse containerResponse = applicationHandler.apply(new ContainerRequest(
URI.create("/"), URI.create("/application.wadl"),
"GET", null, new MapPropertiesDelegate())).get();
final DocumentBuilderFactory bf = DocumentBuilderFactory.newInstance();
bf.setNamespaceAware(true);