Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Escaping 'password' in script?



See
http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptL
angGuide/AppleScript.1a.html for reference. 

-----Original Message-----
From: applescript-studio-bounces+tophu=email@hidden
[mailto:applescript-studio-bounces+tophu=email@hidden] On Behalf
Of Takaaki Naganoya
Sent: Friday, April 22, 2005 10:40 PM
To: AS Studio
Subject: Re: Escaping 'password' in script?

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


 _______________________________________________
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

References: 
 >Re: Escaping 'password' in script? (From: Takaaki Naganoya <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.