Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /trunk/lib/SOAP/Fault.pod [r418] .. [r419] Maximize Restore

  Switch to unified view

a/trunk/lib/SOAP/Fault.pod b/trunk/lib/SOAP/Fault.pod
...
...
2
#
2
#
3
# Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com)
3
# Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com)
4
# SOAP::Lite is free software; you can redistribute it
4
# SOAP::Lite is free software; you can redistribute it
5
# and/or modify it under the same terms as Perl itself.
5
# and/or modify it under the same terms as Perl itself.
6
#
6
#
7
# $Id: Fault.pod 98 2007-10-09 09:41:55Z kutterma $
7
# $Id: Fault.pod 419 2013-04-21 16:59:31Z kutterma $
8
#
8
#
9
# ======================================================================
9
# ======================================================================
10
10
11
=pod
11
=pod
12
12
...
...
14
14
15
SOAP::Fault - encapsulates SOAP faults prior to their serialization or after their deserialization
15
SOAP::Fault - encapsulates SOAP faults prior to their serialization or after their deserialization
16
16
17
=head1 DESCRIPTION
17
=head1 DESCRIPTION
18
18
19
This class encapsulates SOAP faults prior to their serialization or after their deserialization. The methods available are a constructor and four accessors. Each accessor creates an object on demand, just as the other classes do, when called as a static method. Like other accessors in the SOAP::Lite package, they return the object itself when setting the attribute. 
19
This class encapsulates SOAP faults prior to their serialization or after their deserialization. The methods available are a constructor and four accessors. Each accessor creates an object on demand, just as the other classes do, when called as a static method. Like other accessors in the SOAP::Lite package, they return the object itself when setting the attribute.
20
20
21
=head1 GENERATING A SOAP FAULT
21
=head1 GENERATING A SOAP FAULT
22
22
23
To generate a SOAP Fault simply issue a Perl die command on the server side as you might normally. The SOAP processor will intercept the die command and return a SOAP Fault, using the string passed to the die command as the faultstring, to the client making the call. If you require having more control over the SOAP Fault returned to the client, then simply pass a SOAP::Fault object to the die command and the SOAP processor will behave accordingly. For example:
23
To generate a SOAP Fault simply issue a Perl die command on the server side as you might normally. The SOAP processor will intercept the die command and return a SOAP Fault, using the string passed to the die command as the faultstring, to the client making the call. If you require having more control over the SOAP Fault returned to the client, then simply pass a SOAP::Fault object to the die command and the SOAP processor will behave accordingly. For example:
24
24
...
...
61
61
62
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.
62
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.
63
63
64
=back
64
=back
65
65
66
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 SOAP faults, but the latter name is less ambiguous when regarded with the rest of the SOAP::Lite package. Objects of this class also have a special stringification enabled. If an object is printed or otherwise stringified, the value produced is faultcode: faultstring, with the attribute values of the object. 
66
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 SOAP faults, but the latter name is less ambiguous when regarded with the rest of the SOAP::Lite package. Objects of this class also have a special stringification enabled. If an object is printed or otherwise stringified, the value produced is faultcode: faultstring, with the attribute values of the object.
67
67
68
=head1 SEE ALSO
68
=head1 SEE ALSO
69
69
70
L<SOAP::Data>, L<SOAP::Header>, L<SOAP::SOM> 
70
L<SOAP::Data>, L<SOAP::Header>, L<SOAP::SOM>
71
71
72
=head1 ACKNOWLEDGEMENTS
72
=head1 ACKNOWLEDGEMENTS
73
73
74
Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I<Programming Web Services with Perl>, mainly the SOAP::Lite reference found in Appendix B.
74
Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I<Programming Web Services with Perl>, mainly the SOAP::Lite reference found in Appendix B.
75
75