
It can be helpful to print out the raw XML request and/or XML response when interacting with the Web services API for debuggin purposes. Below are sample calls.
XML Request To get the last XML request, simply call getLastRequest on the connection.
Here is a code snippet:
...
$mySforceConnection = new SforceEnterpriseClient();
$mySoapClient = $mySforceConnection->createConnection('enterprise.wsdl.xml');
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
...
echo $mySforceConnection->getLastRequest();
...
XML Response To get the last XML response simply call getLastResponse on the connection.
Here is a code snippet:
...
$mySforceConnection = new SforceEnterpriseClient();
$mySoapClient = $mySforceConnection->createConnection('enterprise.wsdl.xml');
$mylogin = $mySforceConnection->login($USERNAME, $PASSWORD);
...
echo $mySforceConnection->getLastResponse();
...