XML-RPC, authentication possible? if not alternative options?
XML-RPC, authentication possible? if not alternative options?
- Subject: XML-RPC, authentication possible? if not alternative options?
- From: Rodney Tamblyn <email@hidden>
- Date: Fri, 22 Nov 2002 21:10:04 +1300
Hi everyone,
To follow up on my post yesterday....
In OSX Applescript it's possible to make SOAP and XML-RPC calls.
Here's an example:
tell application "
http://localhost:10123"
set returnValue to call xmlrpc ,
{method name:"mail.search", parameters:{"Roxburgh"}}
log returnValue
end tell
The "call xmlrpc" command formats the request into XML, and sends it
via http to the server, which sends an XML response back (again via an
http response).
Unfortunately there doesn't seem to be any way to tell Applescript to
use authentication when connecting to the XML-RPC server (in my case,
the server requires basic authentication).
Does anyone know of a solution to this problem? Otherwise what I think
I'll need to do is write some handlers to format the XML request
myself, and send it to the server, maybe using something like the
following:
-- create xml command
set XMLRPCRequest to .... -- XML-RPC request data here...
-- request from XML-RPC server:
set temp to do shell script "curl --user-agent RSSX --user
username:password --max-time 30 --data " & "\"" & XMLRPCRequest & "\""
& "--silent --show-error " & "\"" & "
http://localhost:10123" & "\""
-- temp should now contain the returned XML data, which can be
processed using XML Tools OSAX
Other suggestions or ideas for solving this problem gratefully
received....
Regards,
Rodney
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.