From 3a3ba6607b561d865b537f3aa32e47788289ff16 Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Tue, 28 Jun 2011 08:08:22 +0000 Subject: [PATCH] Fix for regression introduced in r284. Generating SOAP webservice API documentation on the fly fails mysteriously if mutalyzer/webservice.py does not contain the WSGI application variable. git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/branches/refactor-mutalyzer-branch@292 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1 --- bin/mutalyzer-webservice.wsgi | 5 +++-- mutalyzer/webservice.py | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/mutalyzer-webservice.wsgi b/bin/mutalyzer-webservice.wsgi index db30ae49..e9e1a822 100755 --- a/bin/mutalyzer-webservice.wsgi +++ b/bin/mutalyzer-webservice.wsgi @@ -33,14 +33,15 @@ To start the built-in HTTP server on port 8081: import sys from wsgiref.simple_server import make_server -from soaplib.core.server import wsgi from mutalyzer import webservice DEFAULT_PORT = 8081 -application = wsgi.Application(webservice.soap_application) +# Unfortunately we cannot instantiate wsgi.Application here, see the note +# near the bottom of mutalyzer/webservice.py. +application = webservice.application if __name__ == '__main__': diff --git a/mutalyzer/webservice.py b/mutalyzer/webservice.py index c973eef3..2b58f062 100644 --- a/mutalyzer/webservice.py +++ b/mutalyzer/webservice.py @@ -847,3 +847,8 @@ class MutalyzerService(DefinitionBase): # WSGI application for use with e.g. Apache/mod_wsgi soap_application = Application([MutalyzerService], mutalyzer.SOAP_NAMESPACE, 'Mutalyzer') +# Note: We would like to create the wsgi.Application instance only in the +# bin/mutalyer-webservice.wsgi script, but unfortunately this breaks the +# get_wsdl method of soap_application which we use to generate API +# documentation in website.py. +application = wsgi.Application(soap_application) -- GitLab