[Pywps-dev] pyWPS-4

Jachym Cepicky jachym.cepicky at gmail.com
Fri Nov 6 11:52:25 PST 2015


Hi,

pá 6. 11. 2015 v 16:15 odesílatel Lorenzo Bottaccioli <
lorenzo.bottaccioli at gmail.com> napsal:

> Hello Jachym,
>
> I'm tring to setup a microservice platform with pyWPS-4. I was usign
> before psWPS-3.2. I have some questions:
>
> 1) I'cant run the simple process say hello :( if i use this one dose not
> work
> *http://localhost:5000/wps?service=WPS&request=execute&identifier=say_hello&version=1.0.0&datainputs=[name=Lorenzo]
> <http://localhost:5000/wps?service=WPS&request=execute&identifier=say_hello&version=1.0.0&datainputs=[name=Lorenzo]> *
>
> the output in the web browser is
>
>  <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 ../../../ows/1.1.0/owsExceptionReport.xsd"
> version="1.0.0">
> <ows:Exception exceptionCode="MissingParameterValue" locator="name"/>
> </ows:ExceptionReport>
>

Hmm, works  for me, I use

http://localhost:5002/wps?service=WPS&request=execute&identifier=say_hello&version=1.0.0&datainputs=name=Lorenzo

NOTE: Get rid of [] brackets, it was one of not-so-well implemented
features of PyWPS < 4


> and in the shell is:
>
> *lorenzo at lorenzo-eda:~/Scaricati/pywps-4-demo-master/prova$ python
> demo.py *
> *Configuration file(s)
> ['/home/lorenzo/Scaricati/pywps-4-demo-master/prova/pywps.cfg'] loaded*
> * * Running on http://localhost:5000/ <http://localhost:5000/>*
> *ERROR:root:*
> *None*
> *127.0.0.1 - - [06/Nov/2015 16:03:56] "GET
> /wps?service=WPS&request=execute&identifier=say_hello&version=1.0.0&datainputs=[name=Lorenzo]
> HTTP/1.1" 400 -*
> *INFO:werkzeug:127.0.0.1 - - [06/Nov/2015 16:03:56] "GET
> /wps?service=WPS&request=execute&identifier=say_hello&version=1.0.0&datainputs=[name=Lorenzo]
> HTTP/1.1" 400 -*
>
>  can youe give me an example of a correct request?
>
> 2) I have noticed that there is no more the specification grassLocation in
> the definition of the procces. I have found a way to work with grass which
> is to *import gras.script.setup as gsetup* and run the command  *gsetup.init(gisbase,gisdb,
> location) * defining gisabase gisdb and location varaibles. Is it the
> only way o there is a impletantion like in pyWPS3.2?
>

We did not manage to write any special code in PyWPS-4, if this works for
you, Martin Landa says, it should be ok theoretically.

If it works, it's ok



> 3) Using *http://localhost:5000/wps?WSDL <http://localhost:5000/wps?WSDL>
> *in Qgis I cannot use the qgis wps client. The linux shell reports this
> error:
>
> 127.0.0.1 - - [06/Nov/2015 16:10:22] "GET
> /wps?service=WPS&request=getcapabilities HTTP/1.1" 200 -
> INFO:werkzeug:127.0.0.1 - - [06/Nov/2015 16:10:22] "GET
> /wps?service=WPS&request=getcapabilities HTTP/1.1" 200 -
> ERROR:root:WSDL not implemented
> None
> 127.0.0.1 - - [06/Nov/2015 16:11:33] "GET
> /wps?WSDL&Request=GetCapabilities&identifier=&Service=WPS&Version=1.0.0
> HTTP/1.1" 400 -
> INFO:werkzeug:127.0.0.1 - - [06/Nov/2015 16:11:33] "GET
> /wps?WSDL&Request=GetCapabilities&identifier=&Service=WPS&Version=1.0.0
> HTTP/1.1" 400 -
>
> How can I solve this?
>

Do not use WSDL interface - it's really not implemented in PyWPS-4, but you
should really not need to use it. Just use /wps?request=getcapabilities. ..

the result should be
http://localhost:5002/wps?Request=GetCapabilities&identifier=&Service=WPS&Version=1.0.0



>
> 4) Do you think is possible to deploy multiple services that works in
> parallel on localhost:5000/ and each of them as it's own few process
> inside. The various service will differ from each other like in this
> localhost:5000/service1 localhost:5000/service2. What I want to achive is
> that if I Build a new service and i lunch it will automatically deploy the
> new url. Is this achivable using WSGI?
>


This should be possible with wsgi deployment - you should be inspired by
demo.py in pywps-4-demo project https://github.com/PyWPS/pywps-4-demo

The flask stand-alone server should not be used in  production environment

Good luck!

Jachym



>
> Best Regards,
>
> Lorenzo Bottaccioli
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20151106/922762b8/attachment.html>


More information about the pywps-dev mailing list