[Geoserver-users] WPS ComplexData mimeType "text/xml; subtype=gml/2.1.2" not recognized?

Hello Roel,

I did as you suggested, but unfortunately, this gives me an exception report:

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.1.0"
  xsi:schemaLocation="http://www.opengis.net/ows/1.1
http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd&quot;
  xmlns:ows="http://www.opengis.net/ows/1.1&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>Process returned with an exception
Could not convert
&amp;lt;gml:Polygon&amp;gt;&amp;lt;gml:outerBoundaryIs&amp;gt;&amp;lt;gml:LinearRing&amp;gt;&amp;lt;gml:coordinates&amp;gt;0,0
0,1 1,1 1,0
0,0&amp;lt;/gml:coordinates&amp;gt;&amp;lt;/gml:LinearRing&amp;gt;&amp;lt;/gml:outerBoundaryIs&amp;gt;&amp;lt;/gml:Polygon&amp;gt;
                to target type
com.vividsolutions.jts.geom.Geometry</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

I'm still wondering what's wrong here. I'd like to see a working example
of WPS with polygons in GML 2.1.2.

Thanks for the help!

Laure-Hélène

Hi Laure-Hélène,

You should package the ComplexData using CDATA as shown below:
<wps:Data>
<wps:ComplexData mimeType="text/xml; subtype=gml/2.1.2">
<![CDATA[<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>0,0 0,1 1,1 1,0 0,0</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>]]>
</wps:ComplexData>
</wps:Data>

Probably this will work.

Best regards,

Roel Janken

R&D Manager, Data & Content
ICT Meteovista

Meteovista
A Kwekerijweg 2c | 3709 JA Zeist | The Netherlands
W www.weeronline.nl
     twitter.com/weeronline