[Pywps-dev] PyWPS support for ExecuteResponseLocation, providing process status

Jonas Eberle jonas.eberle at gmx.de
Thu Apr 21 05:14:46 PDT 2016


Thanks. So there is a difference in your environment in having the slash after "wps" or not. 

Works: 
http://localhost/wps/?service=WPS&request=GetCapabilities 

Works not: 
http://localhost/wps?service=WPS&request=GetCapabilities 

The second one is stated as serviceInstance attribute in the ExecuteResponse tag. This is based on the server url variable from the configfile. There you should have http://localhost/wps/ with the trailing slash (default is without trailing slash I guess). 

Cheers, 
Jonas 

----- Am 21. Apr 2016 um 14:02 schrieb Robin Skahjem-Eriksen <skahjem-eriksen at stcorp.no>: 

> Request:
> http://localhost/wps/?service=WPS&request=GetCapabilities

> Response:

> <!-- PyWPS 4.0.0-alpha2 -->

> <wps:Capabilities service="WPS" version="1.0.0" xml:lang="en-US"
> xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
> http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd"
> updateSequence="1">
> <ows:ServiceIdentification>
> <ows:Title>PyWPS Processing Service
> </ows:Title>
> <ows:Abstract>PyWPS is an implementation of the Web Processing Service standard
> from the Open Geospatial Consortium. PyWPS is written in Python.
> </ows:Abstract>
> <ows:Keywords>
> <ows:Keyword>PyWPS
> </ows:Keyword>
> <ows:Keyword>WPS
> </ows:Keyword>
> <ows:Keyword>OGC
> </ows:Keyword>
> <ows:Keyword>processing
> </ows:Keyword>
> <ows:Type codeSpace="ISOTC211/19115">theme
> </ows:Type>
> </ows:Keywords>
> <ows:ServiceType>WPS
> </ows:ServiceType>
> <ows:ServiceTypeVersion>1.0.0
> </ows:ServiceTypeVersion>
> <ows:Fees>NONE
> </ows:Fees>
> <ows:AccessConstraints>NONE
> </ows:AccessConstraints>
> </ows:ServiceIdentification>
> <ows:ServiceProvider>
> <ows:ProviderName>Organization Name
> </ows:ProviderName>
> <ows:ProviderSite xlink:href="http://pywps.org/"/>
> <ows:ServiceContact>
> <ows:IndividualName>Lastname, Firstname
> </ows:IndividualName>
> <ows:PositionName>Position Title
> </ows:PositionName>
> <ows:ContactInfo>
> <ows:Phone>
> <ows:Voice>+xx-xxx-xxx-xxxx
> </ows:Voice>
> </ows:Phone>
> <ows:Address>
> <ows:AdministrativeArea>Administrative Area
> </ows:AdministrativeArea>
> <ows:PostalCode>Zip or Postal Code
> </ows:PostalCode>
> <ows:Country>Country
> </ows:Country>
> <ows:ElectronicMailAddress>Email Address
> </ows:ElectronicMailAddress>
> </ows:Address>
> <ows:OnlineResource xlink:href="Contact URL"/>
> <ows:HoursOfService>Hours of Service
> </ows:HoursOfService>
> <ows:ContactInstructions>During hours of service. Off on weekends.
> </ows:ContactInstructions>
> </ows:ContactInfo>
> <ows:Role>pointOfContact
> </ows:Role>
> </ows:ServiceContact>
> </ows:ServiceProvider>
> <ows:OperationsMetadata>
> <ows:Operation name="GetCapabilities">
> <ows:DCP>
> <ows:HTTP>
> <ows:Get xlink:href="http://localhost/wps"/>
> <ows:Post xlink:href="http://localhost/wps"/>
> </ows:HTTP>
> </ows:DCP>
> </ows:Operation>
> <ows:Operation name="DescribeProcess">
> <ows:DCP>
> <ows:HTTP>
> <ows:Get xlink:href="http://localhost/wps"/>
> <ows:Post xlink:href="http://localhost/wps"/>
> </ows:HTTP>
> </ows:DCP>
> </ows:Operation>
> <ows:Operation name="Execute">
> <ows:DCP>
> <ows:HTTP>
> <ows:Get xlink:href="http://localhost/wps"/>
> <ows:Post xlink:href="http://localhost/wps"/>
> </ows:HTTP>
> </ows:DCP>
> </ows:Operation>
> </ows:OperationsMetadata>
> <wps:ProcessOfferings>
> <wps:Process wps:processVersion="0.1">
> <ows:Identifier>hello_world
> </ows:Identifier>
> <ows:Title>My very first process!
> </ows:Title>
> <ows:Abstract>This process takes the name of a person and displays Hello World
> with it.
> </ows:Abstract>
> </wps:Process>
> <wps:Process wps:processVersion="0.1">
> <ows:Identifier>ipf
> </ows:Identifier>
> <ows:Title>Generic IPF processor
> </ows:Title>
> <ows:Abstract>Processors for handling IPF products
> </ows:Abstract>
> </wps:Process>
> </wps:ProcessOfferings>
> <wps:Languages>
> <wps:Default>
> <ows:Language>en-US
> </ows:Language>
> </wps:Default>
> <wps:Supported>
> <ows:Language>en-US
> </ows:Language>
> </wps:Supported>
> </wps:Languages>
> </wps:Capabilities>

>> On Apr 20 2016, at 5:00 pm, Jonas Eberle <jonas.eberle at gmx.de> wrote:
>> Can you try the following URL:
>> localhost/wps/?service=WPS&request=GetCapabilities

>> Cheers,
>> Jonas

>> ----- Am 20. Apr 2016 um 12:38 schrieb Robin Skahjem-Eriksen
>> <skahjem-eriksen at stcorp.no>:

>>> I am wondering if I have stumbled upon a bug, if not, I find the response quite
>>> cryptic:

>>> request:

>>> localhost/wps/?service=WPS&request=Execute&Identifier=ipf&version=1.0.0&DataInputs=processor_name=ST_IPF_TESTER;processor_version=01.13;input_selector=time-range;muninn_query=validity_stop
>>> > 1980-07-03 and validity_start <
>>> 1980-07-05&status=true&storeExecuteResponse=true

>>> reponse:

>>> <!-- PyWPS 4.0.0-alpha2 -->
>>> <wps:ExecuteResponse xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
>>> http://schemas.opengis.net/wps/1.0.0/wpsExecute_response.xsd" service="WPS"
>>> version="1.0.0" xml:lang="en-US"
>>> serviceInstance="http://localhost/wps?service=WPS&request=GetCapabilities"
>>> statusLocation="http://localhost/wps/3c7e38b6-06e0-11e6-8f17-0242ac190008.xml">
>>> <wps:Process wps:processVersion="0.1">
>>> <ows:Identifier>ipf</ows:Identifier>
>>> <ows:Title>Generic IPF processor</ows:Title>
>>> <ows:Abstract>Processors for handling IPF products</ows:Abstract>
>>> </wps:Process>
>>> <wps:Status creationTime="2016-04-20T10:11:23Z">
>>> <wps:ProcessAccepted>PyWPS Process ipf accepted</wps:ProcessAccepted>
>>> </wps:Status>
>>> </wps:ExecuteResponse>

>>> The document (http://localhost/wps?service=WPS&request=GetCapabilities):

>>> <!-- PyWPS 4.0.0-alpha2 -->
>>> <ows:ExceptionReport 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="service">
>>> <ows:ExceptionText>service</ows:ExceptionText>
>>> </ows:Exception>
>>> </ows:ExceptionReport>

>>> I am wondering why the exception is raised, when my Execute request contains the
>>> service attribute.
>>> Is this a bug, or am I missing something?

>>> Med vennlig hilsen / With kind regards,

>>> Robin Skahjem-Eriksen

>>> Software developer

>>> Science [&] Technology AS

>>> Reg. nr.: 996 229 009 MVA

>>> [E]: skahjem-eriksen at stcorp.no

>>> [Address]:

>>> Forskningsparken

>>> Gaustadalléen 21

>>> 0349 Oslo

>>> Norway

>>> [W]: http://www.stcorp.no

>>> [P]:+47 45 911 694

>>> [E]: info at stcorp.no

>>>> On Apr 20 2016, at 12:01 pm, Robin Skahjem-Eriksen <skahjem-eriksen at stcorp.no>
>>>> wrote:
>>>> Thank you so much for catching that and sharing it with me.

>>>> Med vennlig hilsen / With kind regards,

>>>> Robin Skahjem-Eriksen

>>>> Software developer

>>>> Science [&] Technology AS

>>>> Reg. nr.: 996 229 009 MVA

>>>> [E]: skahjem-eriksen at stcorp.no

>>>> [Address]:

>>>> Forskningsparken

>>>> Gaustadalléen 21

>>>> 0349 Oslo

>>>> Norway

>>>> [W]: http://www.stcorp.no

>>>> [P]:+47 45 911 694

>>>> [E]: info at stcorp.no

>>>>> On Apr 20 2016, at 11:57 am, Jonas Eberle <jonas.eberle at gmx.de> wrote:
>>>>> You have an error in the request, storeExecuteResponse=true and status=true are
>>>>> individual attributes of the request, in your example these are data inputs!
>>>>> Please use & storeExecuteResponse=true & status=true at the end instead using
>>>>> the semicolon. Using the "old" PyWPS I also embraced the data inputs with
>>>>> brackets, this leads to less errors in my opinion: DataInputs= [
>>>>> processor_name=ST_IPF_;processor_version=01.13 ]

>>>>> Cheers,
>>>>> Jonas

>>>>> ----- Am 20. Apr 2016 um 10:05 schrieb Robin Skahjem-Eriksen
>>>>> <skahjem-eriksen at stcorp.no>:

>>>>>> Jonas, thank you for your clarification on the request attributes and the
>>>>>> changes to the WPS spec.

>>>>>> I have added `status=true`to the execution request in addition to the
>>>>>> aforementioned attributes, and I still don't get a reponse with any URL to the
>>>>>> ResponseDocument.

>>>>>> My request looks like this:

>>>>>> http://localhost/wps/?service=WPS&request=Execute&Identifier=ipf&version=1.0.0&DataInputs=processor_name=ST_IPF_TESTER;processor_version=01.13;input_selector=time-range;muninn_query=validity_stop
>>>>>> > 1980-07-03 and validity_start <
>>>>>> 1980-07-05;storeExecuteResponse=true;status=true

>>>>>> And the process is defines as such:

>>>>>> class IPF(Process):
>>>>>> def __init__(self):
>>>>>> inputs = [
>>>>>> LiteralInput(
>>>>>> 'processor_name',
>>>>>> 'IPF processor name',
>>>>>> data_type='string'
>>>>>> ),
>>>>>> LiteralInput(
>>>>>> 'processor_version',
>>>>>> 'IPF processor version',
>>>>>> data_type='string'
>>>>>> ),
>>>>>> LiteralInput(
>>>>>> 'input_selector',
>>>>>> 'SOL input selection',
>>>>>> data_type='string'
>>>>>> ),
>>>>>> LiteralInput(
>>>>>> 'muninn_query',
>>>>>> 'Muninn product catalog query string',
>>>>>> data_type='string'
>>>>>> ),
>>>>>> ]
>>>>>> outputs = [
>>>>>> LiteralOutput(
>>>>>> 'ipf_result',
>>>>>> 'SUCCESS/FAILURE',
>>>>>> data_type='string'
>>>>>> )
>>>>>> ]

>>>>>> super(IPF, self).__init__(
>>>>>> self._handler,
>>>>>> identifier='ipf',
>>>>>> version='0.1',
>>>>>> title='Generic IPF processor',
>>>>>> abstract='Processors for handling IPF products',
>>>>>> inputs=inputs,
>>>>>> outputs=outputs,
>>>>>> store_supported=True,
>>>>>> status_supported=True
>>>>>> )

>>>>>> (.. handler omitted ..)

>>>>>> Am I missing something?

>>>>>> Med vennlig hilsen / With kind regards,

>>>>>> Robin Skahjem-Eriksen

>>>>>> Software developer

>>>>>> Science [&] Technology AS

>>>>>> Reg. nr.: 996 229 009 MVA

>>>>>> [E]: skahjem-eriksen at stcorp.no

>>>>>> [Address]:

>>>>>> Forskningsparken

>>>>>> Gaustadalléen 21

>>>>>> 0349 Oslo

>>>>>> Norway

>>>>>> [W]: http://www.stcorp.no

>>>>>> [P]:+47 45 911 694

>>>>>> [E]: info at stcorp.no

>>>>>>> On Apr 19 2016, at 9:26 pm, Jonas Eberle <jonas.eberle at gmx.de> wrote:
>>>>>>> Hi Robin,

>>>>>>> I guess you're looking for the "statusLocation" attribute of the ExecuteResponse
>>>>>>> tag. The value of this attribute is the URL to the response document,
>>>>>>> especially needed when you use asynchronous execution (both, status=true and
>>>>>>> storeExecuteResponse=true, needed in the execute request). There is no
>>>>>>> executeResponseLocation element, please see the "Corrigendum for OpenGIS
>>>>>>> Implementation Standard Web Processing Service (WPS) 1.0.0 (0.0.8)" [1].

>>>>>>> Best regards,
>>>>>>> Jonas

>>>>>>> [1] = http://portal.opengeospatial.org/files/?artifact_id=32766

>>>>>>> ----- Am 19. Apr 2016 um 11:09 schrieb Robin Skahjem-Eriksen
>>>>>>> <skahjem-eriksen at stcorp.no>:

>>>>>>>> I am trying to get pywps working so that a ResponseDocument is used to show the
>>>>>>>> process status, by having the Execute response provide a URL to the
>>>>>>>> ResponseDocument, as specified in the WPS 1.0 standard.

>>>>>>>> I am not sure if pywps actually supports this and if so, the feature is not well
>>>>>>>> documented. I see that pywps supports serving output files and serving these,
>>>>>>>> and I was hoping that this could be used to provide the response document.

>>>>>>>> I initialize a Process object with `store_supported` and `status_supported` set
>>>>>>>> to `True` and provide `storeExecuteResponse=true` in the GET request. However,
>>>>>>>> I haven't manged to receive a response containing the `executeResponseLocation`
>>>>>>>> element, and I cannot find any code in the master branch code base that handles
>>>>>>>> an `ExecuteResponseLocation`.

>>>>>>>> Am I missing anything, or is this feature simply not supported by pywps?

>>>>>>>> Med vennlig hilsen / With kind regards,

>>>>>>>> Robin Skahjem-Eriksen

>>>>>>>> Software developer

>>>>>>>> Science [&] Technology AS

>>>>>>>> Reg. nr.: 996 229 009 MVA

>>>>>>>> [E]: skahjem-eriksen at stcorp.no

>>>>>>>> [Address]:

>>>>>>>> Forskningsparken

>>>>>>>> Gaustadalléen 21

>>>>>>>> 0349 Oslo

>>>>>>>> Norway

>>>>>>>> [W]: http://www.stcorp.no

>>>>>>>> [P]:+47 45 911 694

>>>>>>>> [E]: info at stcorp.no

>>>>>>>> _______________________________________________
>>>>>>>> pywps-dev mailing list
>>>>>>>> pywps-dev at lists.osgeo.org
>>>>>>>> http://lists.osgeo.org/mailman/listinfo/pywps-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20160421/a48af100/attachment-0001.html>


More information about the pywps-dev mailing list