xmlrpc-client.lsp

Module index

source download

Module: xmlrpc-client.lsp

XMLRPC protocol client routines

Version: 0.3 - comments redone for automatic documentation
Version: 0.4 - multiple indices with nth redone to be compatible with future versions
Version: 0.5 - doc changes
Version: 0.6 - fixed bug in error handler
Version: 0.61 - fixed doc typo
Version: 0.7 - check for valid list type in (get-value expr) thanks Kosh
Version: 0.8 - changed references to /usr/ to /usr/local/
Version: 0.9 - make system.listMethods more flexible for no of args - thanks Ofoe
Author: Lutz Mueller 2005-2011, Kosh 2012, Oofoe 2016


Functions for XML-RPC client

To use this module include a load statement at the beginning of the program:
 (load "/usr/local/share/newlisp/modules/xmlrpc-client.lsp")
 ; or shorter
 (module "xmlrpc-client.lsp")
 
The script xmlrpc.cgi implements a method newLISP.evalString. This module contains a client side function for this method for testing purposes. The file xmlrpc.cgi can be found in the example directory of the newLISP source distribution.

For further information on XML-RPC consult http://www.xmlrpc.com/ .

Whenever a connection could be made, method functions will return a response formatted by the XML-RPC server in XML. If a connection failed the function will return nil and a call to (XMLRPC:error) will return an error text.

If the XML received cannot be parsed into SXML, the function returns nil and (XMLRPC:error) will return an XML error. SXML is XML transformed into LISP S-expressions. If the XML received is syntactically correct but not correctly formatted, XML garbage is returned or nil is returned and an error message in (XMLRPC:error).

§

XMLRPC:system.listMethods

syntax: (XMLRPC:system.listMethods str-url)
parameter: str-url - The URL of the XML-RPC server

return: A list of methods supported.

The server at url returns a list of methods supported.

§

XMLRPC:system.methodHelp

syntax: (XMLRPC:system.methodHelp str-url str-method-name)
parameter: str-url - The URL of the XML-RPC server.
parameter: method-name - The name of the method to get help for.

return: Help for str-method-name

The server at str-url returns help for the method in str-method-name

§

XMLRPC:system.methodSignatures

syntax: (XMLRPC:system.methodSignatures str-url str-method-name)
parameter: str-url - The URL of the XML-RPC server.
parameter: method-name - The name of the method to get the signature for.

return: The signature for a server method.

Gets the calling parameter conventions (signature) for a method method-name at str-url.

§

XMLRPC:execute

syntax: (XMLRPC:execute str-url str-xml-request)
parameter: str-url - The URL of the XML-RPC server.
parameter: str-xml-request - A XML formatted request.

return: XML formatted server response

This is a generic method for making XML-RPC requests. The request must be XML formatted correctly by the sender (client).

§

XMLRPC:newLISP.evalString

syntax: (XMLRPC:newLISP.evalString str-url str-expression)
parameter: str-url - The URL of the XML-RPC server.
parameter: str-expression - The expresssion to be evaluated in a string.

return: The result of the expression evaluation.

The expression in str-expression is encoded in base64 and then transmitted to the remote server.

§

XMLRPC:error

syntax: (XMLRPC:error)

return: Error text of last error occured.



- ∂ -

generated with newLISP  and newLISPdoc