ID:               34657
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gareth at wsys dot co dot uk
-Status:           Open
+Status:           Feedback
 Bug Type:         SOAP related
 Operating System: Windows, Linux
 PHP Version:      5.0.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2005-09-27 14:32:25] gareth at wsys dot co dot uk

Description:
------------
When using the SOAP Client, it normally throws a catchable SoapFault
exception. This helps to elegantly fail if there is a problem with a
Web Service.

However, if the problem occurs when loading the WSDL, it throws a PHP
Fatal Error, which cannot be caught.

This means that if you want to use a web service in a web application,
you cannot handle the error (e.g. there is network congestion, or the
server hosting the web service goes down).

Is this intentional, I am not sure.

If it is intentional (and I hope not given the fact that you are
requesting information from a completely different server, not under
your control), any chance this can be changed to throw either a
SoapFault Exception, or just something that can be caught?

Reproduce code:
---------------
try {
  $sc = new SoapClient("some.wsdl", array());
} catch (Exception $e) {
  echo 'Error Caught';
}

Expected result:
----------------
Error Caught

Actual result:
--------------
Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from '{URL
Removed}' 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34657&edit=1

Reply via email to