@Test public void testExternalSchemaJaxbContextPrefixes() throws Exception { WadlGenerator wg = new WadlGenerator(); wg.setExternalLinks(Collections.singletonList("http://books.xsd")); ClassResourceInfo cri = ResourceUtils.createClassResourceInfo(BookStore.class, BookStore.class, true, true); Message m = mockMessage("http://localhost:8080/baz", "/bookstore/1", WadlGenerator.WADL_QUERY, cri); Response r = handleRequest(wg, m); checkResponse(r); Document doc = StaxUtils.read(new StringReader(r.getEntity().toString())); checkGrammarsWithLinks(doc.getDocumentElement(), Collections.singletonList("http://books.xsd")); List<Element> els = getWadlResourcesInfo(doc, "http://localhost:8080/baz", 1); checkBookStoreInfo(els.get(0), "prefix1:thebook", "prefix1:thebook2", "prefix1:thechapter"); }