# ext/soap ctor errors

- Thread: https://externals.io/message/27096
- Original archive: https://news-web.php.net/php.internals/27096
- Started by Lukas Kahwe Smith on 2006-12-19T09:12:10+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #27096 — Lukas Kahwe Smith — 2006-12-19T09:12:10+00:00

URL: https://externals.io/message/27096#27096

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

---

## #27336 — Knut Urdalen — 2007-01-08T13:51:59+00:00

URL: https://externals.io/message/27096#27336 · In reply to: #27096

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

---

## #39214 — david.zuelke@bitextender.com — 2008-07-23T08:31:53+00:00

URL: https://externals.io/message/27096#39214 · In reply to: #27336

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:
> > […]

---

## #39243 — Noah Fontes — 2008-07-23T18:07:06+00:00

URL: https://externals.io/message/27096#39243 · In reply to: #39214

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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:
> 
> > […]

+1 for this.

Regards,

Noah

- --
Noah Fontes
Bitextender
http://www.bitextender.com/
Phone: +1 919 349 9826
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIh3NKhitK+HuUQJQRAmywAKCH7w7pq7r9dV+UHF81Ky7/9XzYOgCgjAGB
DopF3tsQm31fzXxDhWYU2S8=
=QPf5
-----END PGP SIGNATURE

---

## #39247 — Lukas Kahwe Smith — 2008-07-23T20:49:37+00:00

URL: https://externals.io/message/27096#39247 · In reply to: #39243

Hi,

Should not be too hard for someone with C knowledge to produce a fix I  
would assume. Any takers? Not sure if Dmitry has time for this on such  
short notice ..

regards,
Lukas



> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> David Zülke wrote:
> > […]
>
> +1 for this.
>
> Regards,
>
> Noah
>
> - --
> Noah Fontes
> Bitextender
> http://www.bitextender.com/
> Phone: +1 919 349 9826
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFIh3NKhitK+HuUQJQRAmywAKCH7w7pq7r9dV+UHF81Ky7/9XzYOgCgjAGB
> DopF3tsQm31fzXxDhWYU2S8=
> =QPf5
> -----END PGP SIGNATURE-----
>
> -- 
> 
> 
>

Lukas Kahwe Smith
mls@pooteeweet.org

---

## #39263 — david.zuelke@bitextender.com — 2008-07-24T11:07:49+00:00

URL: https://externals.io/message/27096#39263 · In reply to: #39247

Okay, we're taking care of that.


David



Am 23.07.2008 um 22:49 schrieb Lukas Kahwe Smith:

> Hi,
>
> Should not be too hard for someone with C knowledge to produce a fix  
> I would assume. Any takers? Not sure if Dmitry has time for this on  
> such short notice ..
>
> regards,
> Lukas
>
> 
>
> > […]
>
> Lukas Kahwe Smith
> mls@pooteeweet.org

---

## #39371 — Lukas Kahwe Smith — 2008-07-27T13:07:15+00:00

URL: https://externals.io/message/27096#39371

> Hi David,
>
> That would be great! Currently I need to call the WSDL-file two  
> times to be able to handle the exception.


Resolution of this issue is scheduled for alpha2 (around mid to end of  
August).

regards,
Lukas Kahwe Smith
mls@pooteeweet.org
