?

Log in

No account? Create an account
Problems with LJ.XMLRPC.checkfriends - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Problems with LJ.XMLRPC.checkfriends [Sep. 14th, 2005|01:29 pm]
LiveJournal Client Discussions
lj_clients
[wilsonodk]
[mood |awakeawake]
[music |Means To An End - Joy Division]

I'm running into a problem using the CheckFriends method. It keeps returning an error "Application failed during request deserialization: unclosed token at line 1, column 0, byte 0 at /usr/lib/perl5/XML/Parser.pm line 187." Does anyone know what is causing this?

Sent

<?xml version="1.0">
<methodCall>
<methodName>LJ.XMLRPC.checkfriends</methodName>
<params><param><value><struct>
<member><name>username</name><value><string>LJ.psername</string></value></member>
<member><name>password</name><value><string>LJ.password</string></value></member>
<member><name>ver</name><value><int>0</int></value></member>
<member><name>lastupdate</name><value><string></string></value></member>
</struct></value></param></params>
</methodCall>

Returned

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault><value><struct>
<member>
<name>faultString</name>
<value><string>Application failed during request deserialization: 
unclosed token at line 1, column 0, byte 0 at /usr/lib/perl5/XML/Parser.pm line 187
</string></value>
</member>
<member>
<name>faultCode</name>
<value><string>Client</string></value>
</member>
</struct></value></fault>
</methodResponse>

Thanks for your help.

linkReply

Comments:
From: snej
2005-09-27 05:04 pm (UTC)
Ah … then be aware that, if you're doing this in client-side JS, many (most?) browsers won't let you contact sites (domains) other than the one the page with the script came from. That's a security measure.

So for instance, if you host the script on a page on www.mydomain.com, the browser won't let it contact www.livejournal.com.

If you've been experimenting with HTML files on your disk, you won't have run into this yet, since browsers typically don't put security restrictions on pages from file: URLs. (And it just occurred to me that this might be for a Dashboard or Konfabulator widget, in which case it's also allowed.)
(Reply) (Parent) (Thread)
From: wilsonodk
2005-09-27 05:09 pm (UTC)
Thanks, I was aware of the security limitation. And, yes, it is in fact for a Dashboard widget. :)
(Reply) (Parent) (Thread)