I just started creating a soap service and at the end of the request of I need to be able to log the request and response.
ob_start();
try {
$soapServer = new SoapServer(Smiggly::getSetting("network.soap.WSDLUrl"));
$soapServer->setClass("SoapController");
$soapServer->handle();
} catch(SoapFault $e) {
}
$response = ob_get_contents();
ob_end_flush();
flush();
The problem is that if one of the methods triggers a soap fault it would appear the soap server stops the php execution. I have tried putting the code in a try/catch block and execution still appears to stop.
The code above works fine for responses which do not error. Does anyone have a way to pull the response out before the script execution ends?