I’m having a hard time finding the solution to this, perhaps because my terminology is wrong.
What I would like to do is be able to log the RAW xml returned when I call .get() on a JAXRS WebClient.
The current setup I have does the unmarshalling without any problems when I perform this:
MyObject result = (MyObject) client.get(MyObject.class);
But, I’d like to see what is actually returned by the server in the form of XML to System.out while I debug.
I was able to get the raw XML returned the following way:
String rawXml = client.get(String.class)I was then able to inspect the raw XML as well as pass it to my logger within the class if needed.