Hi Dave,
What I did was to register it as a browser:page instead of as an xmlrpc:view, as described in the original post. That way it works as an xmlrpc method. I haven't tried introspection though (methodList etc) so I don't know if you loose that.

Dave Beyer escribió:
> Hello Enrique,
>
> I was wondering whether you were able to identify a solution to the problem you presented to the zope.plone.product-developers mailing list regarding XML-RPC views in Plone. I'm using Plone 3.0, but am running into the same problem you describe below. Any help would be much appreciated!
>
> Thanks!
>  Dave Beyer
>  Los Altos Hills, CA, USA
>
>
> From: Enrique Perez <[EMAIL PROTECTED] >
> Subject: xmlrpc:view and browser:page
> Newsgroups: gmane.comp.web.zope.plone.product-developers
> Date: 2007-12-05 09:20:12 GMT (6 days, 18 hours and 31 minutes ago)
> 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.


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