how to set wps:ResponseForm for wps execute request?

3 messages Options
Embed this post
Permalink
Matthias Lendholt

how to set wps:ResponseForm for wps execute request?

Reply Threaded More More options
Print post
Permalink
Hi,
on http://docs.codehaus.org/display/GEOTDOC/WPS+Plugin is described how
to generate a WPSFactory and start the execute process with the input
parameters.
Not described is the possibility to set the wps:ResponseForm in the
execute process like for example this one:

<wps:Execute>
...
   <wps:DataInputs>
... input parameters here
   </wps:DataInputs>
<wps:ResponseForm>
     <wps:ResponseDocument>
       <wps:Output asReference="true">
<ows:Identifier>IdentifiedAffectedAreasFeatureCollection</ows:Identifier>
       </wps:Output>
       <wps:Output>
         <ows:Identifier>NumberOfIdentifiedAffectedAreas</ows:Identifier>
       </wps:Output>
       <wps:Output>
         <ows:Identifier>TotalProcessExecutionTime</ows:Identifier>
       </wps:Output>
     </wps:ResponseDocument>
   </wps:ResponseForm>
</wps:Execute>

In particular the 'asReference="true"' is of interest for me for one of
the result parameters.

Is this done in the ProcessDescriptionType where I can set
ProcessOutputsType? Or anywhere else?


Thanks for any help.

Matthias

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
Jody Garnett-2

Re: how to set wps:ResponseForm for wps execute request?

Reply Threaded More More options
Print post
Permalink
That is a great question; when you make the request (ie in the
standard) can you ask for different response types? I think it was
supposed to be automatic - ie it was going to ask for the result in a
format it could understand; and then parse the result into a java
object for you.

Example if a geotiff is being produced you would not need to know - a
gridcoverage would show up in java for you to work with.

I agree it may be useful to have more control here - as such we may
need an api change.

Jody

On Wed, Oct 7, 2009 at 11:07 PM, Matthias Lendholt
<[hidden email]> wrote:

> Hi,
> on http://docs.codehaus.org/display/GEOTDOC/WPS+Plugin is described how
> to generate a WPSFactory and start the execute process with the input
> parameters.
> Not described is the possibility to set the wps:ResponseForm in the
> execute process like for example this one:
>
> <wps:Execute>
> ...
>   <wps:DataInputs>
> ... input parameters here
>   </wps:DataInputs>
> <wps:ResponseForm>
>     <wps:ResponseDocument>
>       <wps:Output asReference="true">
> <ows:Identifier>IdentifiedAffectedAreasFeatureCollection</ows:Identifier>
>       </wps:Output>
>       <wps:Output>
>         <ows:Identifier>NumberOfIdentifiedAffectedAreas</ows:Identifier>
>       </wps:Output>
>       <wps:Output>
>         <ows:Identifier>TotalProcessExecutionTime</ows:Identifier>
>       </wps:Output>
>     </wps:ResponseDocument>
>   </wps:ResponseForm>
> </wps:Execute>
>
> In particular the 'asReference="true"' is of interest for me for one of
> the result parameters.
>
> Is this done in the ProcessDescriptionType where I can set
> ProcessOutputsType? Or anywhere else?
>
>
> Thanks for any help.
>
> Matthias
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Geotools-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel
Matthias Lendholt

Re: how to set wps:ResponseForm for wps execute request?

Reply Threaded More More options
Print post
Permalink
For me it would be even better to have the output value already in the
client. But I get this exception

org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException:
index=0, size=0
        at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:512)
        at org.geotools.data.wps.WPSUtils.createResultMap(WPSUtils.java:380)
        at org.geotools.data.wps.WPSProcess.execute(WPSProcess.java:143)
        at
org.dews_online.geotools.wps.SimpleWpsConnector.executeProcess(SimpleWpsConnector.java:111)
        at de.gfz_potsdam.lendholt.geotools.AAISTest.main(AAISTest.java:60)



There is one output paramater that could be the problem:


       <Output>
 
<ows:Identifier>IdentifiedAffectedAreasFeatureCollection</ows:Identifier>
         <ows:Title>The resulting feature collection that contains the
Identified Affected Areas (returned as a zipped shapefile)</ows:Title>
         <ComplexOutput>
           <Default>
             <Format>
               <MimeType>application/zip</MimeType>

               <Encoding>base64</Encoding>
             </Format>
           </Default>
           <Supported>
             <Format>
               <MimeType>application/zip</MimeType>
               <Encoding>base64</Encoding>

             </Format>
           </Supported>
         </ComplexOutput>
       </Output>

I haven't debugged it but I guess the exception above is thrown for this
parameter. It's a base64 encoded zip file containing a shapefile. Due to
this I was thinking of fetching the file manually with the URL provided
on 'asReference="true"'

Matthias


Jody Garnett schrieb:

> That is a great question; when you make the request (ie in the
> standard) can you ask for different response types? I think it was
> supposed to be automatic - ie it was going to ask for the result in a
> format it could understand; and then parse the result into a java
> object for you.
>
> Example if a geotiff is being produced you would not need to know - a
> gridcoverage would show up in java for you to work with.
>
> I agree it may be useful to have more control here - as such we may
> need an api change.
>
> Jody
>
> On Wed, Oct 7, 2009 at 11:07 PM, Matthias Lendholt
> <[hidden email]> wrote:
>> Hi,
>> on http://docs.codehaus.org/display/GEOTDOC/WPS+Plugin is described how
>> to generate a WPSFactory and start the execute process with the input
>> parameters.
>> Not described is the possibility to set the wps:ResponseForm in the
>> execute process like for example this one:
>>
>> <wps:Execute>
>> ...
>>   <wps:DataInputs>
>> ... input parameters here
>>   </wps:DataInputs>
>> <wps:ResponseForm>
>>     <wps:ResponseDocument>
>>       <wps:Output asReference="true">
>> <ows:Identifier>IdentifiedAffectedAreasFeatureCollection</ows:Identifier>
>>       </wps:Output>
>>       <wps:Output>
>>         <ows:Identifier>NumberOfIdentifiedAffectedAreas</ows:Identifier>
>>       </wps:Output>
>>       <wps:Output>
>>         <ows:Identifier>TotalProcessExecutionTime</ows:Identifier>
>>       </wps:Output>
>>     </wps:ResponseDocument>
>>   </wps:ResponseForm>
>> </wps:Execute>
>>
>> In particular the 'asReference="true"' is of interest for me for one of
>> the result parameters.
>>
>> Is this done in the ProcessDescriptionType where I can set
>> ProcessOutputsType? Or anywhere else?
>>
>>
>> Thanks for any help.
>>
>> Matthias
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Geotools-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>>
>


--
Matthias Lendholt [[hidden email]]
tel: +49 331 288 1687; fax: +49 331 288 1703
Deutsches GeoForschungsZentrum (GFZ)
Telegrafenberg A20; D14473 Potsdam; Germany

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-devel