On Thu, Feb 15, 2001 at 03:26:01PM -0500, Kyler B. Laird wrote:
Today I learned about XML-RPC. We're hard at work trying to get the HTTPS capability welded on to it. (We only use HTTPS for Zope.) It seems that it might be better to use this to populate the ZODB.
XML-RPC over HTTPS is already done for you: $ python xmlrpc_cli.py send: 'POST / HTTP/1.0\015\012' send: 'Host: nova\015\012' send: 'User-Agent: xmlrpc_ssl.py/0.05p2 - xmlrpclib.py/0.9.8 (by www.pythonware.com)\015\012' send: 'Content-Type: text/xml\015\012' send: 'Content-Length: 106\015\012' send: '\015\012' send: "<?xml version='1.0'?>\012<methodCall>\012<methodName>propertyMap</methodName>\012<params>\012</params>\012\012</methodCall>\012" reply: 'HTTP/1.0 200 OK\015\012' header: Server: Zope/Zope 2.3.0 (source release, python 1.5.2, linux2) ZServerSSL/0.06 header: Date: Fri, 16 Feb 2001 15:19:04 GMT header: Connection: close header: Content-Type: text/xml header: Content-Length: 322 [{'id': 'title', 'type': 'string'}] Here's the (abridged) code: from M2Crypto import Rand from M2Crypto.xmlrpclib2 import Server, SSL_Transport Rand.load_file('../randpool.dat', -1) # Server is Zope-2.3.0 on ZServerSSL. zs=Server('https://nova:8443/', SSL_Transport()) print zs.propertyMap() Rand.save_file('../randpool.dat') Here's the plumbing: http://www.post1.com/home/ngps/m2 Have fun! -- Ng Pheng Siong <ngps@post1.com> * http://www.post1.com/home/ngps