downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SoapClient> <is_soap_fault
[edit] Last updated: Wed, 22 May 2013

view this page in

use_soap_error_handler

(Unknown)

use_soap_error_handlerEstablecer si se desea utilizar el controlador de errores SOAP

Descripción

bool use_soap_error_handler ([ bool $handler = true ] )

Esta función establece cuando o no usar el controlador de errores SOAP en el servidor SOAP. Devolverá el valor anterior. Si está definido a TRUE, los datos de los errores en una aplicación SoapServer serán enviados a los clientes como un mensaje de fallo SOAP. Si es FALSE, el manejador de errores PHP será usado. El valor predeterminado es utilizar el manejador de errores PHP estándar.

Parámetros

handler

Establecerlo a TRUE para enviar información de los errores al cliente.

Valores devueltos

Devuelve el valor original

Ver también



add a note add a note User Contributed Notes use_soap_error_handler - [1 notes]
up
0
msynak dot no dot spam dot please at wp dot pl
7 years ago
This function seems to disable/enable automatic error reporting through SOAP. Use it to prevent user "on the other side" from seeing internal errors of your application.
Sometimes it is better to send no answer at all than to inform users that your application has e.g. parse errors.

Usage:

// disable error reporting
use_soap_error_handler(false);

// enable error reporting
use_soap_error_handler(true);

Default state of soap error handler is ENABLED.

It seems that the best practice is to disable it in constructor of your SOAP request handling class and enable in destructor.

For some situations, you may want to create your own error handling function instead (see set_error_handler and set_exception_handler) and throw custom SoapFaults with info like: "We have technical difficulties at the moment. Sorry!".

 
show source | credits | sitemap | contact | advertising | mirror sites