chickadee » xml-rpc » xml-rpc-server

xml-rpc-server uriprocedure

Returns a procedure that, when called with the name of a remote XML-RPC method, will return a procedure that passes its arguments to the XML-RPC server which is given in uri (which can be an URI object or a string representing an URI).

To determine how XML-RPC types are mapped to Scheme types and vice-versa, see below. It's important that you read this, because there is some ambiguity in how lists are mapped (either to arrays or to structs).

Here is an example that fetches the current time of day from xml-rpc.org:

(require-extension xml-rpc-client)

(define time-server
  (xml-rpc-server "http://xml-rpc.org/RPC2") )
  
(define get-current-time
  (time-server "currentTime.getCurrentTime") )
  
(print (time->string (get-current-time)))

For lower-level access to the client (implementing custom handlers, for example), you can use the following procedures: