473,544 Members | 1,939 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4207
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.w eb.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.dancingbiso n.com">Vasudev Ram</a>
Oct 15 '07 #3
On Oct 15, 8:49 pm, vasudevram <vasudev...@gma il.comwrote:
On Oct 15, 8:10 pm, "Diez B. Roggisch" <de...@nospam.w eb.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.dancingbiso n.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.Serve r('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...@gmai l.com" <draghu...@gmai l.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.Serve r('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******** *************@k 35g2000prh.goog legroups.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
1723
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 server (programmed with python). - The COM server must have a connect interface in order to let the client application process the xmlrpc request. -...
2
1937
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
5842
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. On the client side, threads are used to wait on the results of requests to the server. So the question is: how thread-safe is python xmlrpc? If...
0
1724
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 calling server.request() via xml-rpc) server places "request" on queue and returns a unique ID to the calling client client repeatedly asks server if...
0
1205
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 appears to do what I'm looking for. But I'd love some feedback from anyone who might have used it before I go and base some server/client code on it. ...
7
2177
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 without any problems. Do Pthon CGIs use threading? I need to make it very efficient, but I haven't found much information about Python CGI...
1
3147
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 trouble with. I have been looking at how to use threadpool, but I can't see how to get that working. I would like to have the XMLRPC part of things...
0
2738
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: ext/xmlrpc/.libs/xmlrpc-epi-php.o(.text+0x359): In function `set_zval_xmlrpc_type': /php-5.2.5/ext/xmlrpc/xmlrpc-epi-php.c:1313: undefined reference to...
1
2545
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 thread and xmlrpc modules - the idea is that an XML-RPC exposed object tell the queue thread object to add a job. If there are no jobs running, it...
0
7362
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7602
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7764
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7368
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7704
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5904
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5291
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
983
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
657
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.