[Zope] Zope2 and XMLRPC methods
Bill Campbell
bill at celestial.net
Tue Feb 17 17:05:02 EST 2009
On Tue, Feb 17, 2009, Rowan Woodhouse wrote:
>Hi,
>
>I'm having some trouble getting XML-RPC methods going on Zope2/Five.
>I've got the following in my configure.zcml:
>
><configure
> xmlns="http://namespaces.zope.org/zope"
> xmlns:browser="http://namespaces.zope.org/browser"
> xmlns:five="http://namespaces.zope.org/five"
> xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc">
>
> <include package="zope.app.publisher.xmlrpc" file="meta.zcml" />
> <include package="zope.app.security" file="meta.zcml" />
>
> <xmlrpc:view
> for="MZCore.interface.IMZTag"
> methods="smeg"
> class="MZCore.MZTag.MZTag.MZTagXmlRpcInterface"
> permission="zope.Public"
> />
>
></configure>
>
...
>But when I try to access the method via XML-RPC as follows (where aaa is
>and object that implements IMZTag)
I am probably using an older version of zope, but the following
is working for me using xmlrpclib.
from xmlrpclib import ServerProxy
baseurl = 'http://username:password@host.example.com:8080/'
server = ServerProxy(baseurl + 'some/path')
results = server.myFunction() # arguments as necessary
Perhaps this is too simple, but it Just Works(tm).
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186
Force always attracts men of low morality. -- Albert Einstein
More information about the Zope
mailing list