Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: geopython/pywps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: mandsch/PyWPS
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 4, 2013

  1. Copy the full SHA
    de940f9 View commit details
  2. Copy the full SHA
    6f39a91 View commit details
  3. adapt to work with mod_wsgi

    mandsch committed Apr 4, 2013
    Copy the full SHA
    774cee6 View commit details
Showing with 22 additions and 9 deletions.
  1. +2 −2 pywps/Process/InAndOutputs.py
  2. +2 −2 webservices/mod_python/wps.py
  3. +18 −5 webservices/wsgi/wsgiwps.py
4 changes: 2 additions & 2 deletions pywps/Process/InAndOutputs.py
Original file line number Diff line number Diff line change
@@ -197,7 +197,7 @@ class LiteralInput(Input):

dataType = None
uoms = None
restrictedCharacters = ['\\',"#",";", "&","!"]
restrictedCharacters = ['\\',"#","&","!"]
values = None
default = None
spacing = None
@@ -212,7 +212,7 @@ def __init__(self,identifier,title,abstract=None,

self.dataType = dataType
self.uoms = uoms
self.restrictedCharacters = ['\\',"#",";", "&","!"]
self.restrictedCharacters = ['\\',"#","&","!"]
if type(values) == types.StringType:
self.values = (values)
elif type(values) == types.ListType:
4 changes: 2 additions & 2 deletions webservices/mod_python/wps.py
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ def handler(req):

# set PYWPS_CFG and PYWPS_PROCESSES environment variable, which can not
# bee seen from mod_python
env_vars = req.subprocess_env.copy()
env_vars = req.get_options()
if env_vars.has_key("PYWPS_CFG"):
os.environ["PYWPS_CFG"] = env_vars["PYWPS_CFG"]
if env_vars.has_key("PYWPS_PROCESSES"):
@@ -72,7 +72,7 @@ def handler(req):
pywps.debug(wps.inputs)
wps.performRequest()
pywps.response.response(wps.response, req,
wps.parser.isSoap, self.wps.parser.isSoapExecute,contentType = wps.request.contentType)
wps.parser.isSoap, wps.parser.isSoapExecute,contentType = wps.request.contentType)
return apache.OK
except WPSException,e:
pywps.response.response(e, req)
23 changes: 18 additions & 5 deletions webservices/wsgi/wsgiwps.py
Original file line number Diff line number Diff line change
@@ -9,6 +9,16 @@
PythonPath "sys.path+['/usr/local/pywps-VERSION/']"
PythonAutoReload On
for mod_wsgi:
SetEnv PYWPS_CFG usr/local/wps/pywps.cfg
SetEnv PYWPS_PROCESSES /usr/local/wps/processes/
SetEnv PYTHONPATH "/usr/local/pywps-VERSION/"
<Directory /srv/www/wsgi-scripts/>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias /wpswsgi /srv/www/wsgi-scripts/wsgiwps.py
.. moduleauthor: Jachym Cepicky jachym bnhelp cz
"""

@@ -32,19 +42,22 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

import sys

sys.path.append("/home/jachym/usr/src/pywps/trunk/")
import sys, os

import pywps
from pywps.Exceptions import *

def dispatchWps(environ, start_response):
def application(environ, start_response):

status = '200 OK'
response_headers = [('Content-type','text/xml')]
start_response(status, response_headers)

if "PYWPS_PROCESSES" in environ:
os.environ["PYWPS_PROCESSES"] = environ["PYWPS_PROCESSES"]
if "PYWPS_CFG" in environ:
os.environ["PYWPS_CFG"] = environ["PYWPS_CFG"]

inputQuery = None
if "REQUEST_METHOD" in environ and environ["REQUEST_METHOD"] == "GET":
inputQuery = environ["QUERY_STRING"]
@@ -82,5 +95,5 @@ def dispatchWps(environ, start_response):
)[0],"tests","processes")

from wsgiref.simple_server import make_server
srv = make_server('localhost', 8081, dispatchWps)
srv = make_server('localhost', 8081, application)
srv.serve_forever()