Last change on this file was 242, checked in by pvkouteren, 10 years ago

Added documentation and removed duplicate and old code which isn't needed any more.

  • Property svn:mime-type set to text/plain
File size: 1.7 KB
1from soaplib.wsgi_soap import SimpleWSGISoapApp
2from web.IbidasAtomicServicesTemp import IbidasAtomicServices
3from time import strftime
4from wsgiref.simple_server import make_server
5import config
6from container import postgres
9The IbidasSOAPServer class allows starting the WSGI server and handling SOAP requests.
10The SOAP methods are defined in the IbidasAtomicServices class by Soaplib.
11@author: Patrick van Kouteren <>
12@version: 1.0
15class IbidasSOAPServer(SimpleWSGISoapApp, IbidasAtomicServices):
17    def __init__(self):
18        super(SimpleWSGISoapApp, self).__init__()
19        IbidasAtomicServices.__init__(self)
21if __name__=='__main__':
22    try:
23        #server = CherryPyWSGIServer(('localhost',11001),IbidasSOAPServer())
24        #print "[%s] IbidasSOAPServer started.." %(strftime("%Y-%m-%d %H:%M:%S"))
25        #server.start()
26        c = config.loadConfig('ibidas.ini', {})
27        if not(c):
28            print "No valid configuration found. Please provide ibidas.ini in the root directory!"
29        else:
30            if c['ibidas.authenticated_mode'] == 'on':
31                print "[%s] The authenticated_mode variable in your ibidas.ini file is set to ON." %(strftime("%Y-%m-%d %H:%M:%S"))
32                print "[%s] Please note that only openly available datasets may be shared!" %(strftime("%Y-%m-%d %H:%M:%S"))
33            server = make_server('localhost', 11001, IbidasSOAPServer())
34            print "[%s] IbidasSOAPServer started.." %(strftime("%Y-%m-%d %H:%M:%S"))
35            server.serve_forever()
36    except ImportError:
37        print "Error: Server code requires Python >= 2.5"
38    except KeyboardInterrupt:
39        server.stop()
Note: See TracBrowser for help on using the repository browser.