XMLRPC Client implements a client for interacting with a remote / local XMLRPC server. Wikipedia [https://en.wikipedia.org/wiki/XML-RPC]
exampleInvokeOnRemoteMethodWithArguments
| proxy |
proxy := XMLRPCProxy new url: 'http://localhost:8081/' asUrl.
proxy invokeMethod: 'validator1.echoStructTest' withArgs: #('Hallo')
exampleCreateProxy
| proxy |
proxy := XMLRPCProxy new
url: 'http://localhost:8081/' asZnUrl self readme
exampleInvokeOnRemoteMethodWithStruct
| proxy data |
data := Dictionary new.
data at: 'true' put: true.
data at: 'Markus' put: 'Fritsche'.
proxy := XMLRPCProxy new url: 'http://localhost:8081/' asZnUrl.
proxy invokeMethod: 'validator1.echoStructTest' withStruct: data
DateTime object for sending and receiving dates via XML-RPC. See the convenience class methods for easily creating instances of this class.
date time
Encode me into an ISO8601 datetime for XML-RPC
Set the date and time in this object by parsing the ISO8601 string.
Get a new XMLRPCDateTime instance representing the current time.
Get a new XMLRPCDateTime instance from the given ISO8601 string.
Get a new XMLRPCDateTime instance from the given date and time.
Proxy class to issue XML-RPC requests. Example (invoking a method that takes a single integer argument): u := Url absoluteFromText: 'http://bleu.west.spy.net/servlet/net.spy.rpc.XMLRPC'. proxy := XMLRPCProxy withUrl: u. proxy invokeMethod: 'echo.echoInt' withArgs: #(1).
Flickr Example:
| url proxy r |
url := Url absoluteFromText: 'http://api.flickr.com/services/xmlrpc/'.
proxy := XMLRPCProxy new url: url.
d := Dictionary new.
d at: 'name' put: 'flickruser'.
d at: 'api_key' put: 'flickrkey'.
r := proxy invokeMethod: 'flickr.test.echo' withStruct: d.
url
Invoke a method on the XML-RPC server. args is a list of parameters to be passed. For example, if the remote method is called ``test.Method' and takes two ints, youd invoke is like this: anXMLRPCProxy invokeMethod: "test.method" withArgs: #(19 77)
Invoke a method on the XML-RPC server. A value can also be of type . A contains s and each contains a and a . We call a struct using a Dictionay, because each entry already have 2 elements.
Send the XML-RPC data and get the response. Return the raw XML.
Build the XMLRPC data required to invoke the given method with the given collection of arguments.
Process the results.
Invoke a method on the XML-RPC server with no arguments.
Process an XML-RPC fault into an XMLRPCFaultException
Get a new instance of XMLRPCProxy to connect to a given URL.