[Zope] Calling an external method that is a xml-rpc client in javascript

Laura McCord Laura.McCord at doucet-austin.com
Mon Oct 4 17:32:09 EDT 2004


I need to call a xml-rpc subroutine from javascript. How is this done?

In my daemon I have subroutines such as emailInfo, officeInfo,
pwdInfo,...

I call these subroutines in a client function called userInfo(username):

def userInfo(userName):
server = xmlrpclib.Server("http://tweety:8080/RPC2")
email = server.da.emailInfo(userName)
office = server.da.officeInfo(userName)
pwd = server.da.pwdInfo(userName)
acct = server.da.acctInfo(userName)
dir = server.da.dirInfo(userName)
info = {'email' : email,
'office': office,
'pwd' : pwd,
'acct' : acct,
'dir' : dir }
return info

How do I call userInfo in a javascript function?

Thank You in Advance,
 Laura


More information about the Zope mailing list