xmlrpc client call in python does not come back

Posted by Jack Ha on Stack Overflow See other posts from Stack Overflow or by Jack Ha
Published on 2010-03-30T13:44:50Z Indexed on 2010/03/30 13:53 UTC
Read the original article Hit count: 371

Filed under:
|
|
|

Using Python 2.6.4, windows

With the following script I want to test a certain xmlrpc server. I call a non-existent function and hope for a traceback with an error. Instead, the function does not return. What could be the cause?

import xmlrpclib
s = xmlrpclib.Server("http://127.0.0.1:80", verbose=True)
s.functioncall()

The output is:

send: 'POST /RPC2 HTTP/1.0\r\nHost: 127.0.0.1:80\r\nUser-Agent: xmlrpclib.py/1.0
.1 (by www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length: 106\r\n\
r\n'
send: "<?xml version='1.0'?>\n<methodCall>\n<methodName>functioncall</methodName
>\n<params>\n</params>\n</methodCall>\n"
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/xml
header: Cache-Control: no-cache
header: Content-Length: 376
header: Date: Tue, 30 Mar 2010 13:27:21 GMT
body: '<?xml version="1.0"?>\r\n<methodResponse>\r\n<fault>\r\n<value>\r\n<struc
t>\r\n<member>\r\n<name>faultCode</name>\r\n<value><i4>1</i4></value>\r\n</membe
r>\r\n<member>\r\n<name>faultString</name>\r\n<value><string>PVSS00ctrl   (2), 2
010.03.30 15:27:21.395, CTRL, SEVERE,     72, Function not defined, functioncall
, , \n</string></value>\r\n</member>\r\n</struct>\r\n</value>\r\n</fault>\r\n</m
ethodResponse>\r\n'

(here the program hangs and does not return until I kill the server)

edit: the server is written in c++, using its own xmlrpc library

© Stack Overflow or respective owner

Related posts about python

Related posts about xmlrpc