View XMLRPC Requests/Responses?

vasudevram vasudevram at gmail.com
Mon Oct 15 11:49:50 EDT 2007


On Oct 15, 8:10 pm, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> xkenneth wrote:
> > Hi,
>
> >     I'm working on developing an XML-RPC interface from LabVIEW to
> > python and I would really like to see how python is forming it's XML-
> > RPC requests/responses. Is there any way I can force these to a log or
> > print them to the screen? Thanks.
>
> I've utilized the apache axis tcpmon for that, as proxy. See
>
> http://docs.pushtotest.com/axisdocs/user-guide.html#tcpmon
>
> Diez

I haven't used apache axis tcpmon - so don't know how easy or
difficult it is to use that approach - but if its non-trivial or
awkward, there's another easy way - since the xmlrpc lib source is
available - and it is, its part of the Python Standard library - just
root around in the source and modify it to log to a file or to the
screen. Will be pretty straightforward to do it. Its a hack, though, I
know - because your changes would need to be carried around everywhere
you want to use them (but then so does your code), and also because
they would get clobbered when you upgraded to the next Python
release.

So a better way might be to inherit from an appropriate class of
xmlrpclib client or server, use that class in your code instead, and
modify the inherited class to log as needed, by getting hold of some
output stream of the parent class - if it is exposed.

<a href="http://www.dancingbison.com">Vasudev Ram</a>





More information about the Python-list mailing list