WebClient wc = createWebClient(address, new SamlFormOutInterceptor(),
formProvider, true);
wc.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.APPLICATION_XML);
try {
Book book = wc.post(new Form().set("name", "CXF").set("id", 125),
Book.class);
assertEquals(125L, book.getId());
} catch (ServerWebApplicationException ex) {
fail(ex.getMessage());
} catch (ClientWebApplicationException ex) {
if (ex.getCause() != null && ex.getCause().getMessage() != null) {
fail(ex.getCause().getMessage());