Since cross-domain xmlrpc requests are not possible in JavaScript I need to create a Python application that provides both HTML and HTTP and an XML-RPC service in the same domain.
Creating an HTTP request handler and SimpleXMLRPCServer in python is pretty simple, but they should both listen on a different port, which means a different domain.
Is there a way to create something that will listen on a single port on the local host and set the HTTPRequestHandler and XMLRPCRequest handler?
Now I have two different services:
httpServer = HTTPServer(('localhost',8001), HttpHandler);
xmlRpcServer = SimpleXMLRPCServer(('localhost',8000),requestHandler=RequestHandler)
Update
- I can not install Apache on the device
- There is one html page per page
- The only client will be the device running the python service