Message55146
There should be a simple wsgi xmlrpc application and in fact it is not difficult. You could for instance take this one and append it to SimpleXMLRPCServer.py.
class WSGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
def __init__(self, allow_none=False, encoding=None):
SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
def __call__(self, environ, start_response):
"""WSGI interface"""
if environ["REQUEST_METHOD"] != "POST":
status = "400 Bad request"
headers = [("Content-type", "text/html")]
data = "<html><head><title>400 Bad request</title></head><body><h1>400 Bad request</h1></body></html>"
headers.append(("Content-length", str(len(data))))
start_response(status, headers)
if environ["REQUEST_METHOD"] == "HEAD":
return []
return [data]
l = int(environ["CONTENT_LENGTH"])
request = environ["wsgi.input"].read(l)
response = self._marshaled_dispatch(request)
headers = [("Content-type", "text/xml")]
headers.append(("Content-length", str(len(response))))
start_response("200 OK", headers)
return [response]
|
|
Date |
User |
Action |
Args |
2007-08-23 16:12:56 | admin | link | issue1745722 messages |
2007-08-23 16:12:56 | admin | create | |
|