[Geoserver-users] WPS Parameter published as ComplexData

I would like to create a WPS process in GeoServer 2.2 that can accept a list of String as one of its parameters. I defined it as the following:

@DescribeParameter(name=“vectSource”, description=“coverage source name”, min=0, max=6) List vectSource

but when I invoke it with following request:

<wps:Execute xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=“http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd
xmlns:wps=“http://www.opengis.net/wps/1.0.0
xmlns:ows=“http://www.opengis.net/ows/1.1
xmlns:xlink=“http://www.w3.org/1999/xlink
service=“WPS”
version=“1.0.0”>
ows:Identifieregp:TopoExtraction</ows:Identifier>
wps:DataInputs
wps:Input
ows:IdentifiervectSource</ows:Identifier>
wps:Data
wps:ComplexData
BS
HD
</wps:ComplexData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
wps:ResponseForm
wps:ResponseDocument
<wps:Output asReference=“false”>
ows:Identifierresult</ows:Identifier>
</wps:Output>
</wps:ResponseDocument>
</wps:ResponseForm>
</wps:Execute>

I’m getting the following exception:

2012-11-27 09:45:22,453 ERROR [geoserver.wps] - Process execution failed
org.geotools.process.ProcessException: Process execution 8a0f35c8-7884-4595-8ec1-f04a372c7a8c failed
at org.geoserver.wps.executor.DefaultProcessManager.getOutput(DefaultProcessManager.java:157)

Caused by: org.geoserver.wps.WPSException: Failed to retrieve value for input vectSource
at org.geoserver.wps.executor.LazyInputMap.get(LazyInputMap.java:37)
at org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.buildProcessArguments(AnnotationDrivenProcessFactory.java:496)
at org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:381)
at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:215)
at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:189)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
… 3 more
Caused by: java.lang.ClassCastException: org.geoserver.wps.ppio.LiteralPPIO cannot be cast to org.geoserver.wps.ppio.ComplexPPIO
at org.geoserver.wps.executor.SimpleInputProvider.getValue(SimpleInputProvider.java:135)
at org.geoserver.wps.executor.ListInputProvider.getValue(ListInputProvider.java:31)
at org.geoserver.wps.executor.LazyInputMap.get(LazyInputMap.java:35)
… 9 more

It is working well if I split each values on distinct wps:Data element such as the following:

<wps:Execute xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=“http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd
xmlns:wps=“http://www.opengis.net/wps/1.0.0
xmlns:ows=“http://www.opengis.net/ows/1.1
xmlns:xlink=“http://www.w3.org/1999/xlink
service=“WPS”
version=“1.0.0”>
ows:Identifieregp:TopoExtraction</ows:Identifier>
wps:DataInputs
wps:Input
ows:IdentifiervectSource</ows:Identifier>
wps:Data
BS
</wps:Data>

</wps:Input>
wps:Input
ows:IdentifiervectSource</ows:Identifier>
wps:Data
HD
</wps:Data>

</wps:Input>
</wps:DataInputs>
wps:ResponseForm
wps:ResponseDocument
<wps:Output asReference=“false”>
ows:Identifierresult</ows:Identifier>
</wps:Output>
</wps:ResponseDocument>
</wps:ResponseForm>
</wps:Execute>

What do I need to do to support the first type of Request. Do I need to implement a custom class extending org.geoserver.wps.ppio.ComplexPPIO?

Many thanks.

J-F