I have a client-soap in laravel and I would like to know how to store in a file the errors that come back from the soap-server. Below is the code for my client-soap and where it does the soap-server pro request.
try {
print("<pre>".print_r($client->INC($array),true)."</pre>");
}
catch (SoapFault $fault){
echo 'Requesição : <br/><xmp>',
print_r($client->getLastRequest()),
'</xmp><br/>';
echo "</br>";
echo 'Resposta da ACM : <br/> <br/><xmp>',
print_r($client->getLastResponse()),
$fault->faultstring,
'</xmp>';
}
I would like to get the $ fault-> faultstring error and save, how would I do that?