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

search for in the

SoapClient> <is_soap_fault
Last updated: Fri, 13 Nov 2009

view this page in

use_soap_error_handler

(Unknown)

use_soap_error_handlerSOAP エラーハンドラを使用するかどうかを設定する

説明

bool use_soap_error_handler ([ bool $handler ] )

この関数は、SOAP サーバで SOAP エラーハンドラを使用するかどうかを設定します。 それまでに設定されていた値を返します。 TRUE に設定すると、 SoapServer アプリケーションでのエラーの詳細がクライアントに送信されます。 FALSE の場合は、情報は何も送信されません。 no information will be sent.

パラメータ

handler

TRUE に設定すると、エラーの詳細をクライアントに送信します。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

参考



add a note add a note User Contributed Notes
use_soap_error_handler
msynak dot no dot spam dot please at wp dot pl
02-Mar-2006 02:45
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!".

SoapClient> <is_soap_fault
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites