vbrtrmn has asked for the wisdom of the Perl Monks concerning the following question:

I've got my SOAP application working and it works very well, I found SOAP::Lite very easy to implement. Today, I was wondering, "What would happen if the SOAP app server was down." So, I modified the wsdl and proxy to invalid URLs and I started to get some 500 errors, which I kind of expected. In the Apache logs I consistently get the following, which is what I expect.
500 Can't connect to 255.255.255.255:80 (connect: timeout)
My question is: Is there a good way to fail gracefully?

Code snippet:
my $soapClient = SOAP::Lite->new(
	service	=>	"file:/home/test/files/my.wsdl.xml",
	proxy	=>	"http://255.255.255.255/services/soapservice"
);

# Using the call() method causes the 500 error, because there's obviously nothing on 255.255.255.255 
$som = $soapClient->call('getCustomerNameByIPAddress','10.10.10.10');

--
paul

  • Comment on SOAP::Lite - 500 Errors - Please Fail Gracefully