Hello all,

I am trying to use GeoServer (2.10.0) WPS for generating interpolation 
map. The data source already exists as a WFS on the same GeoServer, the 
layer name is MY_PROJECT:expo. I want to interpolate these points on a 
small area (therefore I use BBOX from the WFS input), with the field 
expo_value (from 0 to 1).
Here is the XML query I send, on the URL MY_GEOSERVER_WFS_URL/geoserver/ows

<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" 
service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="http://www.opengis.net/wps/1.0.0"; 
xmlns:wfs="http://www.opengis.net/wfs"; 
xmlns:wps="http://www.opengis.net/wps/1.0.0"; 
xmlns:ows="http://www.opengis.net/ows/1.1"; 
xmlns:gml="http://www.opengis.net/gml"; 
xmlns:ogc="http://www.opengis.net/ogc"; 
xmlns:wcs="http://www.opengis.net/wcs/1.1.1"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 
http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd";>
   <ows:Identifier>gs:BarnesSurface</ows:Identifier>
   <wps:DataInputs>
     <wps:Input>
       <ows:Identifier>data</ows:Identifier>
       <wps:Reference mimeType="text/xml" 
xlink:href="MY_GEOSERVER_WFS_URL/geoserver/wfs" method="POST">
         <wps:Body>
           <wfs:GetFeature service="WFS" version="1.1.0" 
outputFormat="GML2" xmlns:MY_PROJECT="MY_PROJECT">
             <wfs:Query typeName="MY_PROJECT:expo">
                 <ogc:Filter>
                   <ogc:BBOX>
<ogc:PropertyName>geo_data</ogc:PropertyName>
                     <gml:Envelope 
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
                        <gml:lowerCorner>7.24355 43.698739</gml:lowerCorner>
                        <gml:upperCorner>7.266981 
43.713878</gml:upperCorner>
                     </gml:Envelope>
                   </ogc:BBOX>
                </ogc:Filter>
               </wfs:Query>
           </wfs:GetFeature>
         </wps:Body>
       </wps:Reference>
     </wps:Input>
     <wps:Input>
       <ows:Identifier>valueAttr</ows:Identifier>
       <wps:Data>
         <wps:LiteralData>expo_value</wps:LiteralData>
       </wps:Data>
     </wps:Input>
     <wps:Input>
       <ows:Identifier>scale</ows:Identifier>
       <wps:Data>
         <wps:LiteralData>0.001</wps:LiteralData>
       </wps:Data>
     </wps:Input>
     <wps:Input>
<ows:Identifier>maxObservationDistance</ows:Identifier>
       <wps:Data>
         <wps:LiteralData>0.001</wps:LiteralData>
       </wps:Data>
     </wps:Input>
     <wps:Input>
       <ows:Identifier>outputBBOX</ows:Identifier>
       <wps:Data>
         <wps:BoundingBoxData crs="EPSG:4326" dimensions="2">
           <ows:LowerCorner>7.24355 43.698739</ows:LowerCorner>
           <ows:UpperCorner>7.266981 43.713878</ows:UpperCorner>
         </wps:BoundingBoxData>
       </wps:Data>
     </wps:Input>
     <wps:Input>
       <ows:Identifier>outputWidth</ows:Identifier>
       <wps:Data>
         <wps:LiteralData>500</wps:LiteralData>
       </wps:Data>
     </wps:Input>
     <wps:Input>
       <ows:Identifier>outputHeight</ows:Identifier>
       <wps:Data>
         <wps:LiteralData>500</wps:LiteralData>
       </wps:Data>
     </wps:Input>
   </wps:DataInputs>
   <wps:ResponseForm>
     <wps:RawDataOutput mimeType="image/tiff">
       <ows:Identifier>result</ows:Identifier>
     </wps:RawDataOutput>
   </wps:ResponseForm>
</wps:Execute>


The GeoServer sends an error, missing CDATA field :

<?xml version="1.0" encoding="UTF-8"?>
<wps:ExecuteResponse xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:ows="http://www.opengis.net/ows/1.1"; 
xmlns:wps="http://www.opengis.net/wps/1.0.0"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; xml:lang="en" service="WPS" 
serviceInstance="http://geoserver.ad.kinaxia.local:80/geoserver/ows?"; 
version="1.0.0">
     <wps:Process wps:processVersion="1.0.0">
<ows:Identifier>gs:BarnesSurface</ows:Identifier>
         <ows:Title>BarnesSurface</ows:Title>
         <ows:Abstract>Uses Barnes Analysis to compute an interpolated 
surface over a set of irregular data points.</ows:Abstract>
     </wps:Process>
     <wps:Status creationTime="2017-01-12T09:29:37.080Z">
         <wps:ProcessFailed>
             <ows:ExceptionReport version="1.1.0">
                 <ows:Exception exceptionCode="NoApplicableCode">
                     <ows:ExceptionText>The request body should be 
contained in a CDATA section, otherwise it will get parsed as XML 
instead of being preserved as is</ows:ExceptionText>
                 </ows:Exception>
             </ows:ExceptionReport>
         </wps:ProcessFailed>
     </wps:Status>
</wps:ExecuteResponse>


Do you have any idea where this error comes from ? Thanks a lot !!

Gabriel

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to