On Tue, Apr 11, 2006 at 05:54:35PM +0200, Reinoud van Leeuwen wrote: > Hi, > > I have a working Pyhton script to search for users in a plone site with a > commandline xmlrpc client. It cannot be changed into an external method > because of the fact that it only works when running under a role with > sufficient rights. > So I turned it into a product. > > Basically I have (I have deleted some obvious code): > > class Xmlrpcindex(UniqueObject, SimpleItem): > security = ClassSecurityInfo() > security.declarePublic('search') > > def search (self, SearchableText): > return 'foobar' > > The product is recignized as a Zope product and Plone product. It is > installed in my Plone instance and I have made an instance in my Plone > root (with id my_xmlrpc_instance). > > So the client looks like this: > > import xmlrpclib > server = xmlrpclib.Server('http://localhost/plonesite/my_xmlrpc_instance') > results = server.search('sometext') > > > This however generates a NotFound Exception :-(
I'm not sure why you get NotFound, but one thing I spotted is that anything you want to publish in zope 2 must have a docstring. Stating the obvious: have you at least verified that the server url is correct? You should be able to point your browser directly at http://localhost/plonesite/my_xmlrpc_instance . also, I'm not familiar with xmlrpclib.Server. The library docs only mention xmlrpclib.ServerProxy, afaict. Presumably that's just a typo and you are using the standard xmlrpclib? -- Paul Winkler http://www.slinkp.com _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )