By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

SOAP libraries (SoapClient/Pear::SOAP) and error conditions

P: n/a
Hi everyone,

I'm trying to use PHP's built in SoapClient class. It seems really
easy to use, but am unsure of how to handle errors upon construction
of the SoapClient object. If either the network connection is
disabled, false URL is provided, or a malformed WSDL is provided, the
constructor produces an error:

Fatal error: SOAP-ERROR:

Is there someway of preventing PHP from exiting the script and
printing the error? I have tried calling use_soap_error_handler(false)
and providing my own handler (which just prints the information) but
it doesn't seem to have an affect on the soap errors (but does get
called when I use trigger_error).

It seems unusual that such a probable error condition is handled so

If this isn't possible, does anyone know if Pear's soap client handles
error conditions better? I have had a look at the documentation and
couldn't find anything. It would be very unusual for both classes not
being able to handle a rather obvious error condition gracefully.


Sep 16 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I think I found the answer.

At the bottom of it states that
XDebug can interfere with the throwing of exceptions.. this was what
was happening in my case.. calling xdebug_disable() resulted in errors
being thrown when trying to construct a soap client.

Hope that's useful for someone


Sep 16 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.