SoapClient causing a fatal error when WSDL unreachable

Just a very short tip as it was a big surprise to me :) If you have xdebug enabled SoapClient will not throw an exception but cause a fatal error.

All you have to do is disable xdebug or make sure that soap service is available.

Since i am writing about PHP SoapClient it is worth to mention that wsdl is cached in tmp folder on the servers. Most of web service errors that i got were caused by wsdl being cached on the server even that service has changed.

Comments

Thank you very much for this

Thank you very much for this tip! I've almost implemented a solution with set_error_handler :)

2011-06-28 07:39

Post new comment

Image CAPTCHA

About the author

Artur Ejsmont

Hi, my name is Artur Ejsmont,
welcome to my blog.

I am a passionate software engineer living in Sydney and working for Yahoo! Drop me a line or leave a comment.

Enjoy!