Juan Carlos Coruña wrote:
I have another xmlrpc replated problem:
If I test the following script (python) with the Zope management interface it works ok, but if I call the script from outside Zope using xmlrpc I become an Fault error:
xmlrpclib.Fault: <Fault -2: 'Unexpected Zope error value: Add Documents, Images, and Files'>
This is the script:
# Create a unique document id id = 'pepe'
context.tmp.manage_addProduct['OFSP'].addDTMLDocument(id, title="", file='esto es una prueba') doctmp = getattr(context.tmp, id) doctmp.manage_addProperty('sender', 'loginName', 'string') doctmp.manage_addProperty('sessionId', 'session', 'string')
# move the message to the queue obj = context.tmp.manage_cutObjects(ids=[id]) context.manage_pasteObjects(obj)
return id
If I comment the line "context.manage_pasteObjects(obj)" Zope doesn't produce the error response.
Is there a limitations using manage_pasteObjects with xmlrpc? Any solutions?
AFAIK, copy and paste in Zope use Cookies, so they won't work over XML-RPC as you found. You could move something programatically as follows obj = context.tmp[id].aq_base context._setObject(obj, id) context.tmp.manage_delObjects(id) This code could not be called directly from XML-RPC however... Probably your best bet is to create a moveObject() external method that does the above and call it from XML-RPC. hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>