Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the whole xml response from SoapFaultClientException

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

like image 951
hudi Avatar asked Jan 13 '12 10:01

hudi


1 Answers

ex.getSoapFault().getSource() will give you a Source which you can then inspect manually or marshall.

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

like image 114
artbristol Avatar answered Nov 14 '22 01:11

artbristol