Slinky Treecat (slinky_treecat) wrote in lj_clients,
Slinky Treecat
slinky_treecat
lj_clients

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
Host: www.livejournal.com
Content-Type: text/xml
Content-Length: 193

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

</param>
</params>
</methodCall>



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:

http://xmlrpcflash.mattism.com/

Hope that's helpful, if anyone else has been stuck on this... :)
Subscribe

  • 302: lj_dev

    In the interests of consolidating all LiveJournal development-related discussion, we're going to be closing down this community. The same…

  • Plain text to LJ

    I have an old blog from xanga that's in html/plain text and I want to move it over here. Which client would be the best to do this? I also want to…

  • ljKlient 0.2.0 Preview Release 1

    Today marks another milestone in the development of ljKlient — as the first preview of the 0.2 series is released.  Please go to the project…

  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments