[Zope-dev] XMLrpc to Zope
Ng Pheng Siong
ngps@post1.com
Tue, 19 Oct 1999 22:57:24 +0800
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?
I also tried manage_addImage(), but was not able to force the correct
content type.
PS. I'm not subscribed to the list (yet). Please cc replies. TIA.
Cheers.
--
Ng Pheng Siong <ngps@post1.com> * http://www.post1.com/home/ngps