Subject: | Fault not caught/propagated in SOAP::WSDL::Client::call |
Date: | Thu, 26 Feb 2009 13:47:40 -0500 |
To: | <bug-SOAP-WSDL [...] rt.cpan.org> |
From: | "John Green (jjgreen)" <jjgreen [...] cisco.com> |
Versions: 2.00.05 - 2.00.09
File: lib/SOAP/WSDL/Client.pm
Method: call
Snippet:
my ($result_body, $result_header) = eval {
$deserializer_of{ $ident }->deserialize( $response );
}
if (not $@) {
return wantarray
? ($result_body, $result_header)
: $result_body;
}
return $deserializer_of{ $ident }->generate_fault({
code => 'soap:Server',
role => 'urn:localhost',
message => "Error deserializing message: $@. \n"
. "Message was: \n$response"
});
Issues
1. SOAP::WSDL::SOAP::Typelib::Fault11 evaluates to false in
boolean context, so if the deserializer threw a Fault11,
it return undef or (undef, undef)
2. If a deserializer overrides generate_fault to return a
domain-specific exception type which evaluates to true
in boolean context, that specific exception will get
translated to a Fault11 object.