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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to