How can I get the whole XML request from SoapFaultClientException

I get this exception because the answer is soapFault. Are there any options, how can I get the whole xml response from this exception? I need this because the important content of this xml inst is in ex.getFaultStringOrReason() , but as a comment at the end of this xml

+4
source share
1 answer

ex.getSoapFault().getSource() will provide you with a Source , which you can check manually or marshall.

(e.g. with TransformerFactory.newInstance().newTransformer().transform(source, new StringResult() , then call toString() on StringResult)

+4
source

Source: https://habr.com/ru/post/1390805/


All Articles