How to get the PHP SOAP XML before sending?

0

I was reading about the function __getLastRequest of SOAP PHP and I saw that this function returns the last XML sent in 'POST, but if there is an error I can not get the content sent, because it seems to me that the function depends of the success of the connection.

Question: Can you get the content (XML string) before sending to see if the structure is being sent as we need it?

That is, even the operation not succeeding in the connection I need to know the content sent to help conclude whether the error can be in an incorrect parameter or a malformed structure in the sending XML.

Because sometimes a simple consumption in a webservice all happens well, but when the XML structure begins to get large, it becomes more complex to debug only in the codes, a prediction of XML would be a hand in the wheel.

    
asked by anonymous 16.05.2018 / 17:14

0 answers