Jan Dittberner
bca6369b41
git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@185 a67ec6bc-e5d5-0310-a910-815c51eb3124
29 lines
732 B
Python
Executable file
29 lines
732 B
Python
Executable file
#!/usr/bin/python
|
|
#
|
|
# XML-RPC server for gnuviech-admin tool
|
|
# (c) 2006 Jan Dittberner
|
|
# $Id$
|
|
#
|
|
from DocXMLRPCServer import DocXMLRPCServer
|
|
from GnuviechAdmin import ServiceFacade
|
|
import logging
|
|
|
|
def startRPCServer():
|
|
address = ('localhost', 8080)
|
|
server = DocXMLRPCServer(address)
|
|
server.register_introspection_functions()
|
|
server.register_instance(ServiceFacade())
|
|
|
|
try:
|
|
server.serve_forever()
|
|
except KeyboardInterrupt:
|
|
server.server_close()
|
|
|
|
if __name__ == "__main__":
|
|
logger = logging.getLogger()
|
|
hdlr = logging.FileHandler('xmlrpcserver.log')
|
|
f = logging.Formatter('%(asctime)s %(levelname)s %(module)s: %(message)s')
|
|
hdlr.setFormatter(f)
|
|
logger.addHandler(hdlr)
|
|
logger.setLevel(logging.DEBUG)
|
|
startRPCServer()
|