Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: RPC::XML::Client example needed

by trwww (Priest)
on Mar 23, 2012 at 20:56 UTC ( [id://961318] : note . print w/replies, xml ) Need Help??

in reply to RPC::XML::Client example needed

Based on that method signature, it should be as simple as:

my $res = $client->send_request('Gateway.SendMessage' => { Service => 0, Password => 'apassword', Text => 'A demonstration short message', DeliveryTime => '20050421T09:32:00', });

Sometimes RPC::XML doesn't serialize the data to the correct data type (you can tell by stringifying the object or watching the raw network data). In this case you have to wrap the value you want to send around an RPC::XML Data Class instance. There is an example of this right in the synopsis where you can see RPC::XML::int is being used to explicitly set the data type.