Re: ext/soap ctor errors

From: Date: Sun, 27 Jul 2008 13:07:06 +0000
Subject: Re: ext/soap ctor errors
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-39370@lists.php.net to get a copy of this message
Hi David, That would be great! Currently I need to call the WSDL-file two times to be able to handle the exception. Knut David Zülke wrote:
I know this is horribly old, but I just stumbled across the same issue again and realized it has not been tackled yet. Shouldn't we fix that for 5.3? David Am 08.01.2007 um 14:51 schrieb Knut Urdalen:
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


« previous php.internals (#39370) next »