469,358 Members | 1,642 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

View XMLRPC Requests/Responses?

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.

Regards,
Ken

Oct 15 '07 #1
6 4055
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/...de.html#tcpmon
Diez
Oct 15 '07 #2
On Oct 15, 8:10 pm, "Diez B. Roggisch" <de...@nospam.web.dewrote:
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/...de.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>
Oct 15 '07 #3
On Oct 15, 8:49 pm, vasudevram <vasudev...@gmail.comwrote:
On Oct 15, 8:10 pm, "Diez B. Roggisch" <de...@nospam.web.dewrote:
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/...de.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>
I sort of had a need for this myself recently when writing some Python
XML-RPC code, but didn't do it because I could manage to debug my code
without it - but I remember noticing that my XML-RPC server was
logging the requests to stdout, by default (without any code by me to
do it). So I think the approach I mention above should work - just
look around in the server source code for where it does that, and
modify it as per need.

- Vasudev

Oct 15 '07 #4
On Oct 15, 11:07 am, xkenneth <xkenn...@gmail.comwrote:
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.
You may try setting verbose to True as in:

s = xmlrpclib.Server('http://localhost:8000', verbose=True)

This will cause both requests and responses to be printed.

HTH,
Raghu

Oct 15 '07 #5
On Oct 15, 12:31 pm, "draghu...@gmail.com" <draghu...@gmail.com>
wrote:
On Oct 15, 11:07 am, xkenneth <xkenn...@gmail.comwrote:
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.

You may try setting verbose to True as in:

s = xmlrpclib.Server('http://localhost:8000', verbose=True)

This will cause both requests and responses to be printed.
This only works from the client side. On reading your post again, it
appears as though you are looking for server side logging. Of course,
you can still write a small python xmlrpc client (setting verbose) to
see the requests/responses.
Oct 15 '07 #6

"xkenneth" <xk******@gmail.comwrote in message
news:11*********************@k35g2000prh.googlegro ups.com...
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.

Regards,
Ken
www.wireshark.org

-Mark T.

Oct 16 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Juan Carlos CORUA | last post: by
3 posts views Thread by David Hirschfield | last post: by
reply views Thread by David Hirschfield | last post: by
reply views Thread by David Hirschfield | last post: by
7 posts views Thread by viscanti | last post: by
1 post views Thread by Sean Davis | last post: by
reply views Thread by Benjamin Grieshaber | last post: by
1 post views Thread by psaffrey | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.