Hi,
I am trying to publish a method in a Plone-2.5 site through XML-RPC.
I searched google and the plone lists to no avail, so I am posting here.

The method is organic_categories:

class CategoryTree(XMLRPCView):
    """return category trees"""

    @xmlrpccallable(list)
    def organic_categories(self):
        """return a list of organic categories.
           each category is given as a 3-tuple: parent, id, allowed.
        """
        # self.request.RESPONSE.setStatus(200)
        return [1,2]

if I do it with an xmlrpc:view directive in zcml, like:

  <xmlrpc:view
    for="*"
    methods="organic_categories"
    class=".xmlrpc.CategoryTree"
    permission="zope.Public"/>

I get:
Zope has encountered a problem publishing your object. \nCannot locate object at: http://localhost:8080/cice/organic_categories \n

If I publish it as a browser:page, like:

  <browser:page
    for="*"
    name="organic_categories"
    class=".xmlrpc.CategoryTree"
    permission="zope.Public"/>

and do, in the CategoryTree class, __call__ = organic_categories,
I have no problems.

Anyone can help me here?
thanks in advance.

--
Enrique Pérez Arnaud
Yaco Sistemas S.L.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to