OpenAutonomy Reference Implementation Wiki
OpenAutonomy PHP server and related tools
Status: Beta
Brought to you by:
openautonomy
This file is self-contained (depends on nothing else) so it is an appropriate embeddable library for XML-RPC support in JavaScript applications.
For simplicity, it only exposes one public method and its constructor takes only one argument:
// Constructor takes a string pointing to the end-point URL (note that JavaScript access // rules apply so the host name and port must be the same as the calling page). function OaXmlRpc(rpcEndPointUrl) // All calls are asynchronous, taking the method name and an argument array, along with // functions to handle the successful response and fault response. this.callAsync = function(methodName, argArray, onReturn, onError)
Example usage:
var rpc = OaXmlRpc('http://example.com/script.php'); rpc.callAsync('method.test', new Array('arg0', 'arg1'), function(result) { console.log('SUCCESS'); }, function(errorString) { console.log('ERROR: ' + errorString); } );