applescript xml-rpc issues
jogle
Registered Users Posts: 422 Major grins
Hi There
I'm working on some automator actions that will let me (and anyone else once I get them working) export from lightroom, sharpen and upload to Smugmug.
I've got the gui and most of the logic sorted. I'm having issues with the applescript xml-rpc calls.
I've tracked it down to this simple test case that is giving me an error,
it returns:
In my script I use smugmug.login.withPassword but it gives me the same error.
I've been using the excellent Xml-rpc Client from http://www.ditchnet.org/xmlrpc/ to test my requests, I get good data back from it so I know it's not my api key that's the problem.
Has anyone got any experience with applescript's xml-rpc commands who can point out what I'm doing wrong? Or does anyone know of a debugging tool that will let me see what the actual http request the applescript is creating is?
I've only found this post which seems very out of date: http://www.dgrin.com/archive/index.php/t-3842.html
Thanks in advance
-James
I'm working on some automator actions that will let me (and anyone else once I get them working) export from lightroom, sharpen and upload to Smugmug.
I've got the gui and most of the logic sorted. I'm having issues with the applescript xml-rpc calls.
I've tracked it down to this simple test case that is giving me an error,
tell application "http://api.smugmug.com/hack/xmlrpc/1.1.1/" set loginReturn to call xmlrpc {method name:"smugmug.login.anonymously", parameters:{APIKey:"removed"}} end tell
it returns:
"http://api.smugmug.com/hack/xmlrpc/1.1.1/ got an error: invalid API key"
In my script I use smugmug.login.withPassword but it gives me the same error.
I've been using the excellent Xml-rpc Client from http://www.ditchnet.org/xmlrpc/ to test my requests, I get good data back from it so I know it's not my api key that's the problem.
Has anyone got any experience with applescript's xml-rpc commands who can point out what I'm doing wrong? Or does anyone know of a debugging tool that will let me see what the actual http request the applescript is creating is?
I've only found this post which seems very out of date: http://www.dgrin.com/archive/index.php/t-3842.html
Thanks in advance
-James
jamesOgle photography
[FONT=Arial, Helvetica, sans-serif]"The single most important component of a camera is the twelve inches behind it." -A.Adams[/FONT]
0
Comments
It sounds like the xml-rpc request isn't being generated properly.
Get a network sniffer like wireshark (search for SharkLauncher) to verify that the request is being generated properly.
Otherwise, see if there is some way that you can use REST or one of the other formats, xml-rpc is kinda horrendous to deal with in comparison.
Let me know you get one.
Cheers,
David
SmugMug API Developer
My Photos
The only reason that I'm going with xml-rpc is that applescript makes it stupidly easy to use with it's inbuilt xml-rpc and soap frameworks (except as I'm finding, not so easy to debug)
This webpage: http://bbs.applescript.net/viewtopic.php?pid=45542 Explained that you need to put |pipes| around the labels.
so my example above should be:
hurrah!