[Zope] Zope2 and XMLRPC methods
Rowan Woodhouse
rwoodhouse at wirelessmeasurement.com
Tue Feb 17 17:11:59 EST 2009
Bill Campbell wrote:
> 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
Thanks for the suggestion but that is what I'm doing at the moment when
trying to access the method. I can access methods published through a
Plone page on the same server instance without any problems.
The problem seems to be that the XML-RPC method isn't being published or
bound to the IMZTag interface for some reason.
Rowan
More information about the Zope
mailing list