SoapServer::__getLastResponse
PHP function
Edit on GitHub ✎
(PHP 8 >= 8.4)
Returns last SOAP response
Description
SoapServer::__getLastResponse(): string|null
Returns the XML sent in the last SOAP response.
Note
This method works only if the SoapServer object was created with the trace option set to true.
Parameters Parameters
Return Values
The last SOAP response, as an XML string.
Examples
SoapServer::__getLastResponse() example
php
<?php
$server = new SoapServer("some.wsdl", ["trace" => 1]);
$server->handle();
echo "Response:\n" . $server->__getLastResponse() . "\n";
?>