Yes, "Password" is reserved word. So, you have to indicate it as
non-reserved one using "|".
tell application "http://livejournal.com/interface/xmlrpc"
call xmlrpc {method name:"LJ.XMLRPC.postevent",
parameters:{userName:"quill18", |password|:"mypassword",
auth_method:"clear"}}
end tell
Try this.
--
Takaaki Naganoya
email@hidden
http://www.appleco.jp/piyomarusoft/
On 05.4.23 11:24 AM, "Martin Glaude" <email@hidden> wrote:
> (I'm an relatively experienced programmer but very new to Applescript.)
>
> I'm writing a client application for Livejournal.com using their
> XML-RPC interface, but I'm running into this snag:
>
> tell application "http://livejournal.com/interface/xmlrpc"
> call xmlrpc {method name:"LJ.XMLRPC.postevent",
> parameters:{userName:"quill18", password:"mypassword",
> auth_method:"clear"}}
> end tell
>
> Where the label "password" is highlighted in blue - is it some kind of
> reserved word? Running this code results in
> "http://livejournal.com/interface/xmlrpc got an error: Invalid
> password (101)".
>
> Watching the request in ethereal nets this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <methodCall>
> <methodName>LJ.XMLRPC.postevent</methodName>
> <params>
> <param>
> <value>
> <struct>
> <member>
> <name>RApw</name>
> <value>
> <string>mypassword</string>
> </value>
> </member>
> <member>
> <name>username</name>
> <value>
> <string>quill18</string>
> </value>
> </member>
> <member>
> <name>auth_method</name>
> <value>
> <string>clear</string>
> </value>
> </member>
> </struct>
> </value>
> </param>
> </params>
> </methodCall>
>
> Notice that the name field for the password param is "RApw" instead of
> "password". How do I escape the "password" reserved word so it gets
> passed correctly over XML-RPC?
>
> P.S. The Applescript XML-RPC code is more or less copy-and-pasted from
> other sources - I'm having a hard time finding proper documentation
> for this sort of stuff. Any recommendations?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden
This email sent to email@hidden