It looks like the only way to get flat files/data from a WPS service is to use a client. I'm looking to create a super-simple WPS client in Python 2.6 (or other language) without any dependencies on non-default modules.
Right now I'm gathering resources – I haven't done a lick of coding yet.
Can I use a POST HTTP request with a proper header to request a WPS file?
Additional Info:
- There's an OWS LIB example client, but that requires an OWSlibrary.
-
There's a Javascript/OpenLayers client from PyWPS – this looks like its the most independent of external dependencies sans the openlayers.js, but then … well, OpenLayers is its own client.
-
I have the Firefox HTTP Resource Test for POST and GET requests
- I have FireBug
Best Answer
I have done this using urllib2 in python.
Some simple code is
I am using geoserver (with python wps extension).
Geoserver Admin page has a Demos -> WPS Request Builder page. Here you can select a WPS and "Generate XML from process inputs/outputs".
Save the xml into a file (my_wps_request.xml above).
urllib2.request does a POST request with the xml data. In the above example the returned data is a tif so I just write that to a file.
Even simpler I have used curl