String address = "http://localhost:" + PORT + "/the/thebooksxsi/bookstore/books/xsitype";
JAXBElementProvider<Book> provider = new JAXBElementProvider<Book>();
provider.setExtraClass(new Class[]{SuperBook.class});
provider.setJaxbElementClassNames(Collections.singletonList(Book.class.getName()));
WebClient wc = WebClient.create(address, Collections.singletonList(provider));
wc.accept("application/xml");
wc.type("application/xml");
SuperBook book = new SuperBook("SuperBook2", 999L, true);
Book book2 = wc.invoke("POST", book, Book.class, Book.class);
assertEquals("SuperBook2", book2.getName());