473,388 Members | 1,234 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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 4203
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Juan Carlos CORUÑA | last post by:
Hello all, I'm trying to create a COM Server with an embedded xmlrpc server. Here is way it must work: - The client application (programmed with a COM capable language) instantiates my COM...
2
by: john14 | last post by:
Hi, I have an xmlrpc server. I using the python package xmlrpc. Here is what I am doing: s = xmlrpc.server() s.addMethods(method_hash) s.bindAndListen(PORT) while 1: try:
3
by: David Hirschfield | last post by:
An xmlrpc client/server app I'm writing used to be super-simple, but now threading has gotten into the mix. On the server side, threads are used to process requests from a queue as they come in....
0
by: David Hirschfield | last post by:
I have an xmlrpc client/server system that works fine, but I want to improve performance on the client side. Right now the system operates like this: client makes request from server (by...
0
by: David Hirschfield | last post by:
Searching for a python xmlrpc implementation that supports asynchronous requests, I stumbled on this project: http://www.xmlrpc.com/discuss/msgReader$1573 The author is Shilad Sen, and it...
7
by: viscanti | last post by:
Hi, I'm trying to create an XMLRPC server using apache + python (cgi). It's not too difficult to configure everything, but I would like to tune it in order to receive up to 2000 calls per minute...
1
by: Sean Davis | last post by:
I would like to set up a server that takes XMLRPC requests and processes them asynchronously. The XMLRPC server part is trivial in python. The job processing part is the part that I am having...
0
by: Benjamin Grieshaber | last post by:
Hi, I´m on SuSE 9.3 with xmlrpc-c and xmlrpc-c-devel installed (ver. 0.9.10) I tried to compile php with xmlrpc support and got the following errors: ...
1
by: psaffrey | last post by:
I'm trying to implement an application that will listen for requests, run them when they are present but also be able to add new requests even while it's running. I've tried to do this using the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.