Question

I am writing xmlrpc codes to communicate between Apache XML-RPC client and a Python SimpleXMLRPCServer. I have difficulty debugging it, because I can't find a way to see the request XML/response XML. Are there anyway I can see it dump to console or logged in file?

Was it helpful?

Solution

Use a network packet sniffer like ethereal or wireshark.

OTHER TIPS

You can also use verbose=True in python xmlrpc client Example:

s = xmlrpclib.ServerProxy('http://test.xmlrpc.wordtracker.com/',verbose=True,encoding='UTF-8')

To debug the Python SimpleXMLRPCServer code you can use rpdb https://pypi.python.org/pypi/rpdb.

Add rpdb.set_trace() in the server side code where you want to set the breakpoint. It opens the debugger on port 4444. To connect to the debugger, telnet to port 4444.

In the SimpleXMLRPCServer debug session you can see the request XML/response XML.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top