I'm trying to setup some error handling when connecting to a web service.
This is what I tried to do:
$wsdl = 'BadWsdlAddress';
try {
$client = Zend_Soap_Client( $wsdl );
}
Catch( Exception $e ) {
echo 'Web service is unavilable, please try again later';
}
There are the errors I get:
Warning: SoapClient::SoapClient(http:/domain.com/dealerlocator.asmx2?WSDL) [
soapclient.soapclient <http://vtna.com/soapclient.soapclient>]: failed to
open stream: HTTP request failed! HTTP/1.1 404 Not Found in
/path/Zend/library/Zend/Soap/Client/Common.php on line *51
*Warning: SoapClient::SoapClient()
[soapclient.soapclient<http://vtna.com/soapclient.soapclient>]:
I/O warning : failed to load external entity "
http://domain.com/dealerlocator.asmx2?WSDL" in
/path/Zend/library/Zend/Soap/Client/Common.php on line *51
* Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from '
http://domain.com/dealerlocator.asmx2?WSDL' in
/Users/msteudel/Documents/wwwroot/VTNA/Zend/library/Zend/Soap/Client/Common.php
on line *51
*Any suggestions?
--
-----------------------------------------
Mark Steudel
P: 206.375.7244
[email protected]
. : Work : .
http://www.mindfulinteractive.com
. : Play : .
http://www.steudel.org/blog