I agree with Lukas here, currently you have to be proactive against the location of the WSDL-file. I currently do like this in my SoapClient's:

class MySoapClient extends SoapClient {
 public function __construct($wsdl ,$options = array()) {
   if(is_resource(@fopen($wsdl, 'r'))) {
     parent::__construct($wsdl, $options);
   } else {
     throw new Exception("Parsing WSDL: Couldn't load from '$wsdl'");
   }
 }
}

to be able to catch that problem as an Exception.

Regards,
Knut Urdalen

Lukas Kahwe Smith wrote:
Hi,

why do I get warnings when I have failures in my ext/soap ctor?

try {
$client = new SoapClient('http://i_dont_exist.com/some.wsdl', array('exceptions' => true));
} catch (Exception $e) { }

I guess even without the 'exceptions' => true it should always return all issues as an exception. I think this was agreed upon for constructor errors in PHP5, no?

regards,
Lukas


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to