![]() Here is an example of one of my exceptions in the web service: throw new SoapException('You lose the game.', SoapException. So, the solution is simple, just delete all files from /tmp directory on the server that are starting with “wsdl-“ and the error will disappear. I would like to catch the exceptions and access the string and ClientFaultCode that are called with the exception. The problem of the SoapClient is that his temporary files are messed up somehow, maybe the PHP version was upgraded or maybe the /tmp dir was full on production and the server was not able to create new ones but yes, this is the problem. $e->getMessage(), E_USER_ERROR) Įven with this, the error 500 will appear and won’t be caught. faultcode, faultstring, faultactor and detail are standard elements of a SOAP Fault. If you dont have the phpsoap.dll extension enabled in the php.ini file, trying to create an instance of SoapClient will cause PHP to break. Trigger_error("SOAP Fault: (faultcode: ". This class is used to send SOAP fault responses from the PHP handler. The error was really strange, just error 500 and nothing more, even if you are using try catch, you won’t be able to catch and see the error. En este caso, el mtodo SOAP devolver un objecto especial SoapFault el qual encapsula los datos del fallo (faultcode, faultstring, faultactor and. ![]() Para usarse, cree el objecto SoapClient con la opcin exceptions definida a cero o false. Went to an error 500 in production server while using PHP SoapClient library to connect to some third-party API. Esta funcin es til para comprobar si la llamada SOAP ha fallado, pero sin usar excepciones.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |