SOAP::...ault11(3pm)
β¨ NAME β¨
SOAP::WSDL::SOAP::Typelib::Fault11 β the SOAP 1.1 Fault class, bestie π
π¦ DESCRIPTION π¦
Okay so this class models a SOAP 1.1 Fault. That's it, that's the vibe.
Here's the fun part: SOAP::WSDL::SOAP::Typelib::Fault11 objects are false in boolean context, and they serialize to XML on stringification. So like, they're lying to your if statements AND turning into XML when you look at them weird. Main character behaviour fr fr π
Which means you can do something like this:
my $soap = SOAP::WSDL::Client->new();
# ...
my $result = $soap->call($method, $data);
if (not $result) {
die "Error calling SOAP method: ", $result->get_faultstring();
}
No cap, that's the whole trick β the object being false is what lets if (not $result) catch your errors. Iconic. πΈ
π METHODS π
π get_faultcode / set_faultcode
Getter/setter for the object's faultcode property. That's it. Get it, set it, slay.
π get_faultstring / set_faultstring
Getter/setter for the object's faultstring property. The little string that tells you what went wrong π
π get_faultactor / set_faultactor
Getter/setter for the object's faultactor property.
π get_detail / set_detail
Getter/setter for the detail object's detail property.
Heads up bestie, the detail element is aSOAP::WSDL::SOAP::Typelib::Fault11Detailobject. This class gets automatically loaded when you useSOAP::WSDL::SOAP::Typelib::Fault11, so you literally can't use it separately. It comes as a package deal, iykyk π«Ά
Any string β or any object that is not of this class β will be automatically wrapped into a detail object. So don't stress, it'll handle itself β¨
β οΈ Also note: passing a list of detail objects is currently not supported (even though the SOAP 1.1 note allows it). Not me being limited by my own implementation π
π LICENSE AND COPYRIGHT π
Copyright 2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself.
π AUTHOR π
Martin Kutter <martin.kutter fen-net.de>
π§ REPOSITORY INFORMATION π§
$Rev: 851 $
$LastChangedBy: kutterma $
$Id: Fault11.pm 851 2009-05-15 22:45:18Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm $
And that's the whole page, babe π β this gem came to you via perl v5.36.0, dated 2022-10-14, straight out of the User Contributed Perl Documentation collection. Go forth and catch those faults, periodt π β¨
π¦ where this page comes from
- ubuntu noble: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms