NAME

Protocol::XMLRPC::MethodCall - XML-RPC methodCall request

SYNOPSIS

my $method_call = Protocol::XMLRPC::MethodCall->new(name => 'foo.bar');
$method_call->add_param(1);

$method_call = Protocol::XMLRPC::MethodCall->parse(...);

DESCRIPTION

XML-RPC methodCall request object.

ATTRIBUTES

params

Holds method call name.

params

Holds array reference of all passed params as objects.

METHODS

new

Creates a new Protocol::XMLRPC::MethodCall instance. Name is required.

parse

my $method_call = Protocol::XMLRPC::MethodCall->parse('<?xml ...');

Creates a new Protocol::XMLRPC::MethodCall from xml.

add_param

$method_call->add_param(1);
$method_call->add_param(Protocol::XMLRPC::Value::String->new('foo'));

Adds param. Tries to guess a type if a Perl5 scalar/arrayref/hashref was passed instead of an object.

to_string

my $method_call = Protocol::XMLRPC::MethodCall->new(name => 'foo.bar');
$method_call->add_param('baz');
# <?xml version="1.0"?>
# <methodCall>
#    <methodName>foo.bar</methodName>
#    <params>
#       <param>
#          <value><string>baz</string></value>
#       </param>
#    </params>
# </methodCall>

Protocol::XMLRPC::MethodCall string representation.