swis_connection_string = 'sqlite:///C:/PythonSandbox/WOFpy_Sandbox/WOFpy/examples/swis/swis2.db' You can use relative paths too, e.g. if you are calling the above database from the same directory, the connection string can just be: swis_connection_string = 'sqlite:///swis2.db' ''' LCM_connection_string = 'sqlite:///LCM_Data/LCM.db' dao = LCMDao(LCM_connection_string,'LCM_config.cfg') LCM_wof = WOF(dao) LCM_wof.config_from_file('LCM_config.cfg') app = create_app(LCM_wof) app.config.from_object(config.DevConfig) ODMWOFService = create_wof_service_class(LCM_wof) soap_app = soaplib.core.Application(services=[ODMWOFService], tns='http://www.cuahsi.org/his/1.0/ws/', name='WaterOneFlow') soap_wsgi_app = soaplib.core.server.wsgi.Application(soap_app) app.wsgi_app = DispatcherMiddleware(app.wsgi_app, { '/soap/wateroneflow': soap_wsgi_app, }) if __name__ == '__main__':
swis_connection_string = 'sqlite:///C:/PythonSandbox/WOFpy_Sandbox/WOFpy/examples/swis/swis2.db' You can use relative paths too, e.g. if you are calling the above database from the same directory, the connection string can just be: swis_connection_string = 'sqlite:///swis2.db' ''' LCM_connection_string = 'sqlite:///LCM_Data/LCM.db' dao = LCMDao(LCM_connection_string, 'LCM_config.cfg') LCM_wof = WOF(dao) LCM_wof.config_from_file('LCM_config.cfg') app = create_app(LCM_wof) app.config.from_object(config.DevConfig) ODMWOFService = create_wof_service_class(LCM_wof) soap_app = soaplib.core.Application(services=[ODMWOFService], tns='http://www.cuahsi.org/his/1.0/ws/', name='WaterOneFlow') soap_wsgi_app = soaplib.core.server.wsgi.Application(soap_app) app.wsgi_app = DispatcherMiddleware(app.wsgi_app, { '/soap/wateroneflow': soap_wsgi_app, }) if __name__ == '__main__':
from examples.barebones.LCM_dao import LCMDao logging.basicConfig(level=logging.DEBUG) swis_dao = SwisDao('swis/swis_config.cfg', database_uri='sqlite:///swis/swis2.db') lcm_dao = LCMDao('sqlite:///barebones/LCM_Data/LCM.db', 'barebones/LCM_config.cfg') swis_wof = WOF(swis_dao) swis_wof.config_from_file('swis/swis_config.cfg') lcm_wof = WOF(lcm_dao) lcm_wof.config_from_file('barebones/LCM_config.cfg') #Create the Flask applications swis_flask_app = create_app(swis_wof) lcm_flask_app = create_app(lcm_wof) #Create the soaplib classes SWISWOFService = create_wof_service_class(swis_wof) LCMWOFService = create_wof_service_class(lcm_wof) #Create the soaplib applications swis_soap_app = soaplib.core.Application(services=[SWISWOFService], tns='http://www.cuahsi.org/his/1.0/ws/', name='WaterOneFlow') lcm_soap_app = soaplib.core.Application(services=[LCMWOFService], tns='http://www.cuahsi.org/his/1.0/ws/', name='WaterOneFlow')
from examples.barebones.LCM_dao import LCMDao logging.basicConfig(level=logging.DEBUG) swis_dao = SwisDao('swis/swis_config.cfg', database_uri='sqlite:///swis/swis2.db') lcm_dao = LCMDao('sqlite:///barebones/LCM_Data/LCM.db', 'barebones/LCM_config.cfg') swis_wof = WOF(swis_dao) swis_wof.config_from_file('swis/swis_config.cfg') lcm_wof = WOF(lcm_dao) lcm_wof.config_from_file('barebones/LCM_config.cfg') #Create the Flask applications swis_flask_app = create_app(swis_wof) lcm_flask_app = create_app(lcm_wof) #Create the soaplib classes SWISWOFService = create_wof_service_class(swis_wof) LCMWOFService = create_wof_service_class(lcm_wof) #Create the soaplib applications swis_soap_app = soaplib.core.Application( services=[SWISWOFService], tns='http://www.cuahsi.org/his/1.0/ws/', name='WaterOneFlow') lcm_soap_app = soaplib.core.Application( services=[LCMWOFService], tns='http://www.cuahsi.org/his/1.0/ws/',