[Zoo-discuss] Are WPS 2.0.0 Execute ComplexData Inputs passed to Python services correctly?

Lech Karłowicz lendrom at gmail.com
Mon Jan 16 04:05:09 PST 2017


Hello,
I have a question regarding sending Execute requests with complex data
inputs to ZOO powered WPS 2.0.0 service. I'm confused if I'm doing
something wrong or is it a problem with ZOO itself. I'm trying to post an
Execute request to one of the services provided with ZOO installation,
namely UnionPy (I'm using it because I have my own service with which I
have similar problems and I want to rule out my very likely wrong
implementation).

I'm using 2.0.0 version of wps, with POST method. The service has two
inputs - InputEntity1 and InputEntity2 both of which are ComplexData that
can accept text/xml mimeType input. Content of the request I use is
following:

<wps:Execute service="WPS" version="2.0.0" mode="async" response="document"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="
http://www.opengis.net/ows/2.0" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:wps="http://www.opengis.net/wps/2.0" xsi:schemaLocation="
http://www.opengis.net/wps/2.0 http://schemas.opengis.net/wps/2.0/wps.xsd"
xmlns:gml="http://www.opengis.net/gml/3.2">
 <ows:Identifier>UnionPy</ows:Identifier>
 <wps:Input id="InputEntity1">
  <wps:Data mimeType='text/xml'>
<gml:Polygon gml:id="id1" srsName="urn:ogc:def:crs:EPSG::4326">
<gml:exterior>
<gml:LinearRing>
<gml:posList>49.158238358322279 15.841700644652438 45.617998115236041
15.841700644652438 45.617998115236041 19.60791366921227 49.158238358322279
19.60791366921227 49.158238358322279 15.841700644652438</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
  </wps:Data>
 </wps:Input>
 <wps:Input id="InputEntity2">
  <wps:Data mimeType='text/xml'>
<gml:Polygon gml:id="id2" srsName="urn:ogc:def:crs:EPSG::4326">
<gml:exterior>
<gml:LinearRing>
<gml:posList>43.810215863447326 13.431324308934148 47.124483325059963
13.431324308934148 47.124483325059963 17.272861593985176 43.810215863447326
17.272861593985176 43.810215863447326 13.431324308934148</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
  </wps:Data>
 </wps:Input>
 <wps:Output id="Result"/>
</wps:Execute>


The service does not return any error but in the GetResult response I get
wrong output:

 <ogr:FeatureCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ogr="http://ogr.maptools.org/" xmlns:gml="http://www.opengis.net/gml"
xsi:schemaLocation="http://ogr.maptools.org/ store11547.xsd">
  <gml:boundedBy>
<gml:null>missing</gml:null>
</gml:boundedBy>




</ogr:FeatureCollection>

I modified the code of ogr_sp.py to log values of parameters that are
passed by ZOO to the UnionPy function and I can see, that
inputs['InputEntity1']['value'] is equal to '\n' or '\n\t\t' so it looks
like ZOO does not pass inputs correctly. Or I am doing something wrong. I'd
be very grateful for clarifying that.


I'm using osgeo-live 10.0 virtual machine (with ZOO version 1.5).

Best Regards,
Lech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20170116/2e880047/attachment.html>


More information about the Zoo-discuss mailing list