Hi Mom You are absolutely right.
The exception is thrown in logIn and hence can be caught. Here is the corrected version: http://gist.github.com/429896 :-) Jonathan On Tue, Jun 8, 2010 at 10:40 AM, Mon Zafra <[email protected]> wrote: > Just guessing, but shouldn't the $client->login() call be inside the try > block? Looking at the Client constructor and setWsdl(), I don't think the > SoapFault exception can be thrown from those. > > -- Mon > > > On Tue, Jun 8, 2010 at 1:44 PM, Jonathan Maron <[email protected]> > wrote: >> >> Hello all >> >> I am currently in the process of porting Zend_Service_LiveDocx to ZF2. >> >> In the case that Zend\Soap\Client\Client cannot be instantiated, an >> exception is thrown. However, I cannot find a way to catch this >> exception. >> >> Below is a snippet, which illustrates the issue: >> >> http://gist.github.com/429653 >> >> The uncaught exception error message is: >> >> PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: >> Parsing WSDL: Couldn't load from >> 'http://invald.example.com/missing.wsdl' : failed to load external >> entity "http://invald.example.com/missing.wsdl" >> >> I have tried catching "SoapFault" and "\SoapFault", but to no avail. >> >> In ZF 1.10, Zend_Soap_Client_Exception was thrown in such cases. >> >> Should Zend\Soap\Client\Client throw \Zend\Soap\Client\Exception? >> >> Or how should we catch SoapFault in the current implementation? >> >> Thanks in advance. >> >> Jonathan Maron > >
