The gs:Download process lets me download the sample tiger:poi layer syncronously with the following request:
<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd">
<ows:Identifier>gs:Download</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>layerName</ows:Identifier>
<wps:Data>
<wps:LiteralData>tiger:poi</wps:LiteralData>
</wps:Data>
</wps:Input>
<wps:Input>
<ows:Identifier>outputFormat</ows:Identifier>
<wps:Data>
<wps:LiteralData>application/json</wps:LiteralData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
<wps:RawDataOutput mimeType="application/zip">
<ows:Identifier>my_file_name</ows:Identifier>
</wps:RawDataOutput>
</wps:ResponseForm>
</wps:Execute>
Note that the “my_file_name” Identifier is ignored, and the response has the header “Content-Disposition: attachment; filename=result.zip”
If you then change the ResponseForm tag with the following:
<wps:ResponseForm>
<wps:ResponseDocument storeExecuteResponse="true" status="true" mimeType="application/zip">
<wps:Output asReference="true">
<ows:Identifier>my_file_name</ows:Identifier>
</wps:Output>
</wps:ResponseDocument>
</wps:ResponseForm>
</wps:Execute>
The process returns the link for the status
The process will fail with the following log:
22 dic 16:40:56 ERROR [wps.executor] - Failed writing out the results
org.geoserver.wps.WPSException: Unknown output my_file_name possible values are: [result]
at org.geoserver.wps.executor.ExecuteResponseBuilder.build(ExecuteResponseBuilder.java:229)
at org.geoserver.wps.executor.WPSExecutionManager$Executor.execute(WPSExecutionManager.java:448)
at org.geoserver.wps.executor.WPSExecutionManager$Executor.call(WPSExecutionManager.java:366)
at org.geoserver.wps.executor.WPSExecutionManager$Executor.call(WPSExecutionManager.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
But no feedback is given through the status link, it just returns:
<?xml version="1.0" encoding="UTF-8"?>
<wps:ExecuteResponse xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink"/>
|