i'm using Frontier::Client to get back information from Advogato's XML-RPC interface and I'm having trouble with the methods that return an array. Here is a sample invocation of the test.guess method:

---- request ---- <?xml version="1.0"?> <methodCall> <methodName>test.guess</methodName> <params> </params> </methodCall> ---- response ---- <?xml version="1.0"?> <methodResponse> <params> <param> <array> <data> <value> <string>You guessed</string> </value> <value> <int>42</int> </value> </data> </array> </param> </params> </methodResponse>
I try to access it from perl like this:
my $client = Frontier::Client->new( 'url' => 'http://www.advogato.org/XMLRPC', use_objects => 1, debug => 1,); my ($string, $int) = $client->call('test.guess') or die "$!\n";
and get back the XML above plus:
wanted `value' or `name' tag, got `array' at line 5 column 6
and the variables don't get filled in. Is this a limitation in the module or did I do something wrong?

--
જલધર


In reply to Getting an XML-RPC array with Frontier::Client by jaldhar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.