.NET C# Java Javascript Exception

SoapClient on PHP

new SoapClient(..) throws a "fatal error" when the wsdl-url is not callable. This statement is wrapped in a try/catch block, nevertheless a fatal error is displayed. The catch block will not be entered.

Querying google, i found that the reason is the php module "xdebug": see http://stackoverflow.com/questions/1406632/checking-a-url-is-valid-from-php-soap-client/1421395#1421395

So i turned this off - and the exception will be catched normally - but only on my local system. On another system (with xdebug) this workaround does not work, the error/exception is still not catchable and a fatal error will be triggered.

Any idea?
akimo 31 1 2
akimo 31 1 2
1 Antwort
you could try to disable the error-msg with @. That would look like the following:

try {
$soapClient = @new SoapClient("not-callable.wsdl",array("exceptions" => 1));
} catch (SoapFault $e) {
echo "Failure: ".$e->faultstring;

Please let me know, if that works.
DevConfusion 149 1 3

Stelle deine Php-Frage jetzt!