String endpointAddress =
"http://localhost:" + PORT + "/the/bookstore1/books/html/123";
WebClient client = WebClient.create(endpointAddress);
client.accept("text/html");
WebClient.getConfig(client).getHttpConduit().getClient().setReceiveTimeout(100000000);
XMLSource source = client.accept("text/html").get(XMLSource.class);
Map<String, String> namespaces = new HashMap<String, String>();
namespaces.put("xhtml", "http://www.w3.org/1999/xhtml");
namespaces.put("books", "http://www.w3.org/books");
String value = source.getValue("xhtml:html/xhtml:body/xhtml:ul/books:bookTag", namespaces);
assertEquals("CXF Rocks", value);
String ct = client.getResponse().getMetadata().getFirst("Content-Type").toString();
assertEquals("text/html", ct);
}