[imp] Calling IMP thru XML-RPC
MIlos Prudek
prudek at bvx.cz
Thu Jun 8 09:22:48 PDT 2006
Hi,
I'm trying to figure out how to call Horde from Python via XML-RPC. Knowledge
of Python is not required to understand the following snippets.
Python has a built-in library xmlrpclib that takes care of everything. The
following test script works perfectly from Python:
def getStateName(self, number):
import xmlrpclib
server_url="http://betty.userland.com"
server=xmlrpclib.Server(server_url)
return server.examples.getStateName(number)
It returns Alabama for 01 and Wyoming for 50 from RPC server at userland.com.
Based on that test script I wrote this snippet:
def getAuth(self, user, pwd):
import xmlrpclib
server_url="http://www.orl.cz/horde/rpc.php"
server=xmlrpclib.Server(server_url)
return server.imp.authenticate(user,pwd)
It returns two errors: "multiple elements on top level" and "Syntax error at
line 2: multiple elements on top level"
Is my snippet OK?
--
Milos Prudek
More information about the imp
mailing list