LNS Home
XML Tools 2.9
XML Tools Home
Documentation
 
XML Parsing
XML Event-Based Parsing
XML Generation
Encodings
Utility AppleScript Code
Sample Applications
 
WatchNews
XML-RPC
Products
x Script Debugger 4.5
Freeware
XML Tools
XSLT Tools
List & Record Tools
Property List Tools
JavaScript OSA
Sample XML-RPC Server
OSAXen Fixer
CodeWarrior Tools
Site Contents
News
bullet Mark’s Blog
Product Registration
Bug Reporting
x Freeware
Contacting Us

The Application

The XML-RPC protocol is a cross-platform remote procedure call that uses HTTP as it's transport. This sample application demonstrates how to use XML-RPC from AppleScript.

Download XML-RPC Lib v1.0d8 (70K) release notes (you will also need XML Tools 2.3.2)

NOTE: due to bugs in URL Access Scripting on Mac OS X 10.0.x and 10.1, XML-RPC Lib does not work under that versions of the Mac OS. However, Apple has built XML-RPC and SOAP support into Mac OS X 10.1. Details are available here.

Before running the sample script, move the XML-RPC Lib file to a folder called Libraries (create this folder if it does not already exist) within the Scripts folder of your System Folder.

The XMLRPC object offers a single public method: invokeMethod(host, method, parameterList).

-- load the XML-RPC library at compile time
property  XMLRPC : XMLRPC  of (load script  alias ((path to  scripts folder  as  string) & "Libraries:XML-RPC Lib"))

--
two sample invokations
set  theResponse1  to  XMLRPC's invokeMethod("http://betty.userland.com:80/RPC2", "examples.getStateName", 41)
set  theResponse2  to  XMLRPC's invokeMethod("http://betty.userland.com:80/RPC2", "examples.getStateList", {{1, 4, 45, 6}})

--
display the result of both tests in results window
{theResponse1, theResponse2}
--
   Result:
--
   {
--
      "South Dakota",
--
      "Alabama,Arkansas,Vermont,Colorado"
--
   }

 


Copyright © 1998-2008 Late Night Software Ltd. - All Rights Reserved.