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()

    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 :-(

Am I doing something elementary wrong? Should I call the search method in 
another way?

>From the ZMI error log:

User Name (User Id) Anonymous User (None)
Request URL         http://localhost/plonesite/my_xmlrpc_instance/search
Exception Type      NotFound
Exception Value     http://localhost/plonesite/my_xmlrpc_instance/search

Traceback (innermost last):

    * Module ZPublisher.Publish, line 92, in publish
    * Module ZPublisher.BaseRequest, line 344, in traverse
    * Module ZPublisher.HTTPResponse, line 640, in debugError

"Nothing is as subjective as reality"
Reinoud van Leeuwen    [EMAIL PROTECTED]
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to