SOAP::Fault (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
SOAP::Fault - encapsulates SOAP faults prior to their serialization or after their deserializationDESCRIPTION
This class encapsulatesGENERATING A SOAP FAULT
To generate a
die SOAP::Fault->faultcode('Server.Custom') # will be qualified ->faultstring('Died in server method') ->faultdetail(bless {code => 1} => 'BadError') ->faultactor('www.soaplite.com/custom');
METHODS
- new(optional data)
-
$fault = SOAP::Fault->new(faultcode => 'Server');
Explicitly creates a new SOAP::Fault object. Any of the four attributes represented next by accessor methods may be passed in the argument list with values immediately following their attribute name.
- faultcode(optional value)
-
$fault->faultcode('MethodUnknown');
Returns the current fault code or sets it if a value is given.
- faultstring(optional value)
-
$fault->faultstring("There is no $method here");
Returns or sets the fault string.
- faultactor(optional value)
-
$fault->faultcode($header->actor);
Returns or sets the fault-actor element. Note that the actor isn't always required in a
SOAPfault. - faultdetail(optional value)
-
$fault->faultcode(bless { proxy => $ip }, 'Err');
Returns or sets the fault's detail element. Like the actor, this isn't always a required element. Note that fault detail content in a message is represented as tag blocks. Thus, the values passed to this accessor when setting the value are either SOAP::Data objects, or more general blessed hash references.
In addition to these methods, the SOAP::Fault package also provides detail as an alias for faultdetail. The former is the actual name of the element with
SEE ALSO
SOAP::Data, SOAP::Header,ACKNOWLEDGEMENTS
Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from Programming Web Services with Perl, mainly the SOAP::Lite reference found in Appendix B.COPYRIGHT
Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved.This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHORS
Paul Kulchenko (paulclinger@yahoo.com)Randy J. Ray (rjray@blackperl.com)
Byrne Reese (byrne@majordojo.com)