XML-RPC Introspection Client : XML RPC « Network « Python Tutorial






import xmlrpclib, sys

url = 'http://www.oreillynet.com/meerkat/xml-rpc/server.php'
s = xmlrpclib.ServerProxy(url)

methods = s.system.listMethods()

while 1:
    for i in range(len(methods)):
        print "%2d: %s" % (i + 1, methods[i])
    selection = raw_input("Select one (q to quit): ")
    if selection == 'q':
        break
    item = int(selection) - 1
    print "Details for %s\n" % methods[item]
    
    for sig in s.system.methodSignature(methods[item]):
        print "Args: %s; Returns: %s" % (", ".join(sig[1:]), sig[0])
    print "Help:", s.system.methodHelp(methods[item])








21.23.XML RPC
21.23.1.Creating an XML-RPC Server
21.23.2.Creating an XML-RPC Client
21.23.3.XML-RPC Basic Client
21.23.4.XML-RPC Introspection Client
21.23.5.Doc XML RPC Server Example
21.23.6.Simple XML RPC Server Example with functions
21.23.7.Simple XML RPC Server Basic Example
21.23.8.XML-RPC Basic Test Client
21.23.9.CGI Example