I had been looking for a way to call a function using XML-RPC in Python with the xmlrpclib class. The problem was I wanted to call it from within an organization behind an HTTP proxy, and the python object (ServerProxy) didn’t allow it by default.

Nevertheless, if we look closer to the class constructor:

we realize it’s possible to define an optional Transport object. And that was the solution, as I found explained in this (Japanese) page: XML-RPC over the proxy server. Link is broken, but there is already an example in the python official doc (see bottom of the document page). ­čÖä

It defines a derivated transport class:

And now it’s possible to do XML-RPC over a proxy:


Comments are closed.