I am trying to trace rare, intermittent problem. A SOAP call is made, nice XML comes back, and information is stored in a database. On rare occasions though, some information goes missing. I cannot replicate this problem, but luckily the raw XML response is logged.
I have some nice debugging tracing functions on my development environment, so I would like to go through the process, but have the SoapClient use my xml, instead of what it receives from the server. I started to just replace $result = $this->_mySoap->FUNC_NAME($params);
with $result = // parse test.xml
The problem is that the native SOAP function return an instance of SimpleClass, while parsing test.xml returns an instance of SimpleXMLElement class. I could try to convert one to the other, that would defeat my original goal of tracing the source of the intermittent bug in existing code.
Any thoughts on how I can force SoapClient to use this xml from a file, instead of actually making an api call?