Hi Matthias:

I have just been paying attention to the Parameter definitions in  
order to make swing dialogs for the demo section. There is no  
requirement for an object tree (we just take it when we can get it); I  
would of expected a java.util.Map to hold the complex information (if  
it was not something more specific like Geometry or a Feature).

The WPS spec has a very whacked relationship with complex data  
parameters; it allows you to stitch in complex data but you need to  
refer to a schema that defines the possibilities for what is getting  
stitched in. As a result the WPS document examples referred to a  
couple magic schemas for holding a single geometry; my impression was  
if I wanted to add my own thing I would need to set up a similar  
arrangement.

So if you can get by with an xml fragment that should be okay; if you  
want Objects out you may need to explore that xml parser a bit more  
and add bindings for any content we don't currently handle (from your  
list I would expect swe and om). Ben has some hard one experience -  
especially with om - so I would recommend talking to him.

Jody


On 24/09/2009, at 9:56 PM, Matthias Lendholt wrote:

> Hi Justin, all,
>
> upon your bug fix for the parsing problem I'm stucked with the next
> problem: The WPS process requires three input parameters. Two of them
> are literals and I can easily create them with
>
> Map<String, Object> parameters = new HashMap<String, Object>();
> parameters.put("scenarioScope", "regional");
> parameters.put("resultLength", "5");
>
> The third one (whose description caused the parsing exception) is a
> complex data type with several namespaces (gml, swe, xlink, om, ns)
> included. For my first try I dropped the idea to build the xml tree as
> object tree with XMLBeans or something like that. Instead I saved the
> <ComplexData> content of an example input into a xml fragment file,  
> read
> this file into a String and put it also into the param map:
> parameters.put("observations",xmlFragment);
>
>
> But is this allowed? Or do I have to provide an object tree that can  
> be parsed?
>
>
> After triggering the WPSFactory with execute(inputParameters,null) the
> outputstream is build in AbstractWPS#internalIssueRequest(Request  
> request).
>
> Checking the ouputsStream:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wps:Execute service="WPS" version="1.0.0"
>    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";>
>
> <ows:Identifier>de.awi.tsunami.smf.io.wps.SelectScenario</ 
> ows:Identifier>
>    <wps:DataInputs>
>        <wps:Input>
>            <ows:Identifier>scenarioScope</ows:Identifier>
>            <wps:Data>
>                <wps:LiteralData>regional</wps:LiteralData>
>            </wps:Data>
>        </wps:Input>
>        <wps:Input>
>            <ows:Identifier>observations</ows:Identifier>
>            <wps:Data>
>                <wps:ComplexData schema="http://www.opengis.net/ 
> om.xsd"/>
>            </wps:Data>
>        </wps:Input>
>        <wps:Input>
>            <ows:Identifier>resultLength</ows:Identifier>
>            <wps:Data>
>                <wps:LiteralData>5</wps:LiteralData>
>            </wps:Data>
>        </wps:Input>
>    </wps:DataInputs>
> </wps:Execute>
>
> The literal input parameters scenarioScope and resultLength have been
> created perfectly but the compex data object is empty.
>
> The object->xml encoding happens in org.geotools.xml.Encoder but  
> before debugging this someone can hopefully help me and clarify if  
> it's allowed to use a String with XML content or if I have to use an  
> object tree.
>
> If I have to build an object tree: Are there examples in GeoTools  
> how to realize this?
>
> Thank you very much,
> Matthias


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to