response = wr.get(ClientResponse.class);
System.out.println(response.getEntity(String.class));
Map<String, Link> ordersLinks = processLinkHeaders(response);
wr = c.resource(createdOrderUrl);
response = wr.head();
Map<String, Link> orderLinks = processLinkHeaders(response);
Link cancel = orderLinks.get("cancel");
if (cancel != null) {
System.out.println("** Canceling the order at URL: " + cancel.getHref());