

import xmlrpclib

from twisted.internet import reactor
from twisted.web      import xmlrpc

def doIt():
    proxy = xmlrpc.Proxy ( 'http://localhost:8111' )
    the_date = xmlrpclib.DateTime()
    print "Sending Date: ", the_date

    def _cb ( r ):
        print "Received reply: ", r
        reactor.stop()

    def _eb ( f ):
        print "Received error: ", f
        reactor.stop()

    d = proxy.callRemote ( "echoDate", the_date )
    d.addCallbacks ( _cb, _eb )

doIt()
reactor.run()
