zeltus has asked for the wisdom of the Perl Monks concerning the following question:
I am fairly new to XML-RPC stuff and I think I might be approaching it from an "unusual" angle! :-). Anyway, I have an API Server I need to interface with that expects to see input along the lines of
<?xml version="1.0"?> <methodCall> <methodName>Gateway.SendMessage</methodName> <params> <param> <value> <struct> <member> <name>Service</name> <value><int>0</int></value> </member> <member> <name>Password</name> <value>aPassword</value> </member> <member> <name>Text</name> <value>A demonstration short message</value> </member> <member> <name>DeliveryTime</name> <value><dateTime.iso8601>20050421T09:32:00</dateTime.iso8601>< +/value> </member> </struct> </value> </param> </params> </methodCall>
Now,
use RPC::XML::Client; my $client = RPC::XML::Client->new('http://path-to-rpc-server:19000'); my $res = $client->send_request('Gateway.SendMessage');
seems (I hope) clear enough, but I can't for the life of me understand how to get the Service,Password,Text etc parameters across.
Please, please can someone help?
Since I am coming across more and more API's written this way, it feels natural to take their expected XML input and translate it into what RPC::XML can work with. But I can't find any examples that display this sort of thinking. Am I really coming at this backwards?
Thanks
Bill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: RPC::XML::Client example needed
by Khen1950fx (Canon) on Mar 23, 2012 at 12:29 UTC | |
Re: RPC::XML::Client example needed
by trwww (Priest) on Mar 23, 2012 at 20:56 UTC |
Back to
Seekers of Perl Wisdom