At 16:57 19/10/99 , Ng Pheng Siong wrote:
Hi,
I've been mucking around with Zope's XML-RPC, drawing inspiration from Amos's HOWTO.
Here's what I tried:
from M2Crypto.xmlrpclib2 import Server, SSL_Transport s=Server('https://test:test@127.0.0.1:8443/junk', SSL_Transport()) s.manage_addDocument('uploaded', 'from_vim', '0.dtml') Traceback (innermost last): File "<stdin>", line 1, in ? File "c:\pkg\python\lib\xmlrpclib.py", line 547, in __call__ return self.__send(self.__name, args) File "c:\pkg\python\lib\xmlrpclib.py", line 630, in __request request File "c:\ngps\prog\m2\M2Crypto\xmlrpclib2.py", line 57, in request headers xmlrpclib.ProtocolError: <ProtocolError for test:test@127.0.0.1:8443/junk: 302 Moved Temporarily>
A DTML document object was indeed created in /junk, ProtocolError notwithstanding. Can anyone who knows the innards of Zope shed some light on why its response is 302?
This is correct. After creating the DTML Document, the method redirects the user to either the management view of the Folder the method was created in, or the edit view of the DTML Method itself, depending on whether the user pressed the 'Add' or the 'Add and Edit' button. See line 193 and on in lib/python/OFS/DTMLDocument.py. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------