The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POE::Filter::XML::RPC::Response - An abstracted XMLRPC response

SYNOPSIS

    use 5.010;
    use POE::Filter::XML::RPC::Response;
    use POE::Filter::XML::RPC::Value;

    my $response = POE::Filter::XML::RPC::Response->new
    (
        POE::Filter::XML::RPC::Value->new('Okay!');
    )

    say $response->return_value()->value() # Okay!

DESCRIPTION

POE::Filter::XML::RPC::Reponse provides a simple class for generating XMLRPC responses.

PUBLIC METHODS

new()

new() takes a single argument that can either be a POE::Filter::XML::RPC::Value object or it can be a POE::Filter::XML::RPC::Fault object.

fault()

If the response contains a Fault object, it will be returned. May also take a single argument of another Fault object. In that case, any previous Fault object will be replaced with the provided. Also, if the response contained a valid return Value, it will be replaced by the Fault.

return_value()

If the response contains a return Value, it will be returned. May also take a single argument of another Value object. In that case, any previous Value object will be replaced with the provided. Also, if the response contained a Fault, it will be replaced by the Value.

NOTES

Response is actually a subclass of POE::Filter::XML::Node and so all of its methods, including XML::LibXML::Element's, are available for use. This could ultimately be useful to avoid marshalling all of the data out of the Node and instead apply an XPATH expression to target specifically what is desired deep within a nested structure.

AUTHOR

Copyright 2009 Nicholas Perez. Licensed and distributed under the GPL.