Slinky Treecat (slinky_treecat) wrote in lj_clients,
Slinky Treecat

A few days ago I posted a question about XML-RPC calls using Flash.  Despite several helpful suggestions I wasn't able to find a solution.. until today:

LJ's listing of what a "getchallenge" call should look like reads:

POST /interface/xmlrpc HTTP/1.0
User-Agent: XMLRPC Client 1.0
Content-Type: text/xml
Content-Length: 193

<?xml version="1.0"?>


So, trying to emulate this in Flash I was building the following XML to send:

<?xml version="1.0"?><methodCall><methodName>LJ.XMLRPC.getchallenge</methodName><params><param /></params></methodCall>

Which threw a "failure during deserialization.  Array can't be set to a null value" or something to that effect.  After poking around and experimenting for a bit I came to the conclusion that the XML should be formatted like this:

<?xml version="1.0"?><methodCall><methodName>LJ.XMLRPC.getchallenge</methodName><params /></methodCall>

And VOILA!  It works.

I also found a very nice looking XML-RPC library written for ActionScript 2.0, which I plan to use rather than writing my own from scratch:

Hope that's helpful, if anyone else has been stuck on this... :)
  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened