Re: [Zope] Can't get "objectIds()" (and others) from XML-RPC
Ah, now then. You've hit some of the problems of XML-RPC here. There is no way to pass named params with XML-RPC. XMLRPC also can't handle 'None' or NIL or anything that means undefined. You could try and work around this by using a dictionary of params rather than simple params. ----- Original Message ----- From: "Gilles Lenfant" <glenfant@bigfoot.com> To: "Phil Harris" <phil.harris@zope.co.uk> Sent: Friday, May 11, 2001 12:52 PM Subject: Re: [Zope] Can't get "objectIds()" (and others) from XML-RPC
Many thanks Phil ! It worked at first attempt !
Hmmm. additional question for this kind of workaround : I need support for optional arguments in a Zope python script, just like this in "natural python"
def stuff(param=None): if param: # do it with provided param else: # provide default param param = []
I've tried to put "param=None" in the parameter list of the zope management screen but it seems that it remains like "None" when I provide data for the "param"...
This is just for using "objectIds()" and "objectIds('DTML Method')" with the same Zope python script "myObjectIds"
TIA again
Gilles
----- Original Message ----- From: Phil Harris To: Gilles Lenfant ; zope@zope.org Sent: Friday, May 11, 2001 12:45 PM Subject: Re: [Zope] Can't get "objectIds()" (and others) from XML-RPC
Yes, you did!
The objectIds are no longer callable via a URL, they can only be called from DTML or Python (internal and external).
This means that you can't call it via XML-RPC.
Don't lose hope though, here's how to get around this limitation.
Create an Internal Python Script in the root of Zope, with these contents:
return context.objectItems()
This will return the list and all will be well.
You should though have some security on this method, otherwise *everybody* will see the contents on your Zope instance.
Thanks in advance for any hint.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Phil Harris