See Getting Started.

Activate the conda workshop enviroment:

$ source activate workshop


As you develop more complex process and use more structured datasets, using simply a web browser to test becomes impractical. In this chapter you get acquainted with alternative tools to interact with a PyWPS instance.


  • You will learn how to test a PyWPS process.


Start by trying the GetCapabilities request:

$ wget -q -O caps.xml \

Important question: Why -q, -O and " in the comnand:

quit verbose information about requests.
Output to file. You can use -, and the content will be dumped into the prompt.
Otherwise wget would not consider & as part of the URL and would cut it.


Similar to wget you can also use curl to retrieve the GetCapabilities XML document:

$ curl -s -o caps.xml \
silent mode … no progress bar.
Output to file. You can use -, and the content will be dumped into the prompt.

RESTClient (Firefox only)

You can use the RestClient Firefox plugin to run requests.

Here is an example with a GetCapabilities request using HTTP method GET:


XML HTTP Post Request

As requests and data become more structure and lengthy, concatenating all parameters into a URL for a GET type request becomes difficult or impossible. For this reason the WPS standard allows the definition of requests as XML documents sent to the server using the POST method of the HTTP protocol.

Here is an example with an Execute request using HTTP method POST:


It is using the XML description of the Execute request.

It is also possible to use curl (or wget) for POST requests:

$ curl -H "Content-Type: text/xml" -X POST \
  -d@execute_req.xml http://localhost:5000/wps
pass data from the given filename (XML payload)
HTTP method, GET or POST
Header variable, in our case we set the Content-Type.


ExceptionReport is an important feature of WPS. In WPS 1.0.0 we have the following exceptions:

The request does not include a parameter value or a default cannot be found.
The request contains an invalid parameter value.
Generic exception, no other code could be applied.
The server does not have enough space available.

Try the following request:

$ curl ""

The exception is MissingParameterValue:

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" version="1.0.0">
<ows:Exception exceptionCode="MissingParameterValue" locator="version" >
  <ows:ExceptionText>Missing version</ows:ExceptionText>

The version parameter is missing.

In case of Python errors in the called process, PyWPS will dump the Python stack into the ExceptionReport.

Exercise 1

Try wget or curl with some of the previous DescribeProcess and Execute requests.

Exercise 2

Run the POST request using the prepared XML payload.

Change into the tutorial processes folder:

$ cd ~/birdhouse-workshop/tutorials/11_pywps_testing

Make sure no WPS service is running … stop it with CTRL-c.

Start the demo service:

$ python ../../demo/demo.py

Use the above curl command with the payload execute_req.xml, which you can find in this folder. Modify the input parameters of the payload.


There is another POST request example in the point-clouds talk by NCI.