Use getLastRequest
. It returns the XML sent in the last SOAP request.
echo "REQUEST:\n" . $SOAP->__getLastRequest() . "\n";
And remember, this method works only if the SoapClient object was created with the trace
option set to TRUE
. Therefore, when creating the object, use this code:
$SOAP = new SoapClient($WDSL, array('trace' => 1));