• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
XML-RPC, authentication possible? if not alternative options?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: XML-RPC, authentication possible? if not alternative options?
      • From: Gary Lists <email@hidden>
  • Prev by Date: Re: Number of days left in the month
  • Next by Date: Re: footprint in pdf
  • Previous by thread: Re: footprint in pdf
  • Next by thread: Re: XML-RPC, authentication possible? if not alternative options?
  • Index(es):
    • Date
    • Thread