Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, bhargav, bquinlan, bra, loewis
Date 2010-10-02.16:58:14
SpamBayes Score 0.00040708
Marked as misclassified No
Message-id <>
It's easy enough to subclass the Transport type and add custom types to the dispatcher object, see the script below.
Attila, Bhargav, is this solution acceptable to you?

from xmlrpclib import Transport, ServerProxy

class MyTransport(Transport):
    def getparser(self):
        parser, unmarshaller = Transport.getparser(self)

        # Get the class attribute, clone it
        dispatch = unmarshaller.dispatch.copy()
        # and store it on the instance
        unmarshaller.dispatch = dispatch

        # Now we can add custom types
        dispatch["ex:i8"] = dispatch["int"]

        return parser, unmarshaller

uri = ""
server = ServerProxy(uri, transport=MyTransport(use_datetime=True))
print server.currentTime.getCurrentTime()
Date User Action Args
2010-10-02 16:58:17amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, loewis, bquinlan, bra, bhargav
2010-10-02 16:58:16amaury.forgeotdarcsetmessageid: <>
2010-10-02 16:58:15amaury.forgeotdarclinkissue8792 messages
2010-10-02 16:58:14amaury.forgeotdarccreate