Людмила Костик (be_progressive) wrote in lj_dev,

RPC request for polling

Hey there!
I try to send request to Lj rpc-xml server for polling, but it return an error 203 - "Invalid argument(s): answers [203]".

Poll has ID
1968584 and chosen answer is 2.

The data that I send:

requestHash = new HashMap<String, Object>();
requestHash.put("pollid", "1968584");
requestHash.put("answers", "2");
client.call("LJ.XMLRPC.votepoll", requestHash);

In ljprotocol.pl I found following code:

# check answers parameter
  my $answers = $req->{answers};
  return fail($err, 200, 'answers') unless($answers);
  return fail($err, 203, 'answers') unless(ref $answers eq 'HASH');

But I can't understand, what means 'HASH' :(
Please, help me to find out, what am I doing wrong.
Tags: client, client: posting
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments

duskwuff

May 27 2014, 13:12:56 UTC 5 months ago

The "answers" parameter must be an XMLRPC dictionary (probably another HashMap in your language), not a number.

be_progressive

May 27 2014, 13:24:01 UTC 5 months ago

Yes, I've figured it out )) Thanks

be_progressive

May 27 2014, 13:25:24 UTC 5 months ago

The problem is solved. That 'HASH' means Map.