I have a Jersey client that is successfully calling a REST service and populating the associated Java Beans CustomerType
based on this code:
WebResource service = client.resource(SECURE_BASE_URL);.
CustomerType cust = service.path("customer").path("23210")
.accept(MediaType.TEXT_XML).get(CustomerType.class);
What I would like is to call the service with
service.path("customer").path("23210").accept(MediaType.TEXT_XML).get(String.class);
to get the XML string and then convert the XML to the CustomerType
bean. I would like to do it this way for logging and to help with designing the system. Is there a ways to convert the XML to the bean?