Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
September 16, 2008, 3:32 pm
rate this thread
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.
Re: SOAP libraries (SoapClient/Pear::SOAP) and error conditions
I think I found the answer.
At the bottom of http://bugs.php.net/bug.php?id=38703 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
- » How do I retrieve my array from mysql_fetch_array when returned from a class?
- — Previous thread in » PHP Scripting Forum