[Project_owners] XML-RPC trouble

Matthew Wilson matthew at mjwilson.demon.co.uk
Thu Mar 31 19:18:32 EST 2005


I have to admit that when I read your email, I for some reason thought 
you were using XMLHttpRequest. I have to confess to knowing nothing 
about Mozilla's XMLRPC support, but here's three things that occurred to me:

1. The XMLRPC client is in pure JS, so you can easily edit it in the 
browser components directory to add debug.

2. What happens if you just do "window.alert (result)"?

3. According to the LiveJournal documentation, the returned value is a 
<struct>. Doesn't that mean that result should be an nsIDictionary?

Matthew

David Murray wrote:
> The missing stuff related to it is:
> 
> dsLogin = new Object();
> 
> dsLogin.xmlrpc = 
> Components.classes["@mozilla.org/xml-rpc/client;1"].createInstance(Components.interfaces.nsIXmlRpcClient); 
> 
> 
> Both those lines are outside any functions. dsAccounts.posturl is a 
> string that = "http://www.livejournal.com/interface/xmlrpc"
> 
> I checked with HTTPHeaders, and it seems to send the request fine, and 
> formed right. I copied the request and sent it via HTTPeek to see what 
> the exact response was, and the response is valid too. There is an 
> object returned from the request (as you can see, the third parameter in 
> RPCHandler.onResult); I just can't seem to read it or do anything useful 
> with it at all.
> 
> I'll post the code up tomorrow if I still can't figure it out, but I'm 
> off to bed now, after 11 straight hours trying to figure this out. 
> Goodnight all.
> 
> David.
> 
> 
> matthew at mjwilson.demon.co.uk wrote:
> 
>> lid2000 at tpg.com.au wrote:
>>
>>> Yes, it's me again, this time with another stupid problem. It seems 
>>> that every afternoon I find myself tearing my hair out for 7 hours 
>>> over a different problem. I'm trying to communicate with LiveJournal 
>>> via XML-RPC.
>>
>>
>>
>> There seems to be a lot of code missing from your sample. Can you post 
>> a link to complete code?
>>
>> Also try installing LiveHttpHeaders and see what's actually being sent 
>> and received.
>>
>> Matthew
>> _______________________________________________
>> Project_owners mailing list
>> Project_owners at mozdev.org
>> http://mozdev.org/mailman/listinfo/project_owners
>>
>>
>>
>>
> 
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 




More information about the Project_owners mailing list