Hexagon Geospatial
MENU

WebGIS Q&A

WebGIS enables powerful geospatial web applications and services that securely share your organization’s rich geospatial data, and provides tools to deeply examine spatial data and create value added products, on demand.
Showing results for 
Search instead for 
Do you mean 

Portal settings needed for Geoserver WFS services

by Technical Evangelist on ‎02-28-2018 07:21 AM (394 Views)

Symptoms

Geoserver WFS service v2.0.0 doesn't work properly with Geospatial Portal, throwing "Service returned exception" messages in the GUI.

Diagnosis

Geoserver cannot handle BBOX properly. Typical error log in Portal:

 

Request parsing failed
Parsing failed for BBOX: java.lang.NullPointerException

While the POST request seems ok:

 

<wfs:Query typeNames="p1:States2" srsName="urn:ogc:def:crs:EPSG::4326">
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
      <fes:BBOX>
        <fes:ValueReference>the_geom</fes:ValueReference>
        <Envelope srsName="urn:ogc:def:crs:EPSG::4326" xmlns="http://www.opengis.net/gml">
          <lowerCorner>32.5144371700717 -15.4682436068792</lowerCorner>
          <upperCorner>47.1701988888217 10.1079282681208</upperCorner>
        </Envelope>
      </fes:BBOX>
    </fes:Filter>
  </wfs:Query>
</wfs:GetFeature>

 

Solution

Disable BBOX filtering for Geoserver WFS by creating a service quirk, e.g.:

 

<serviceQuirk serviceType="WFS" urlPattern="geoserver" limitByMapRange="false" >
</serviceQuirk>

Because Feature Info tool utilizes BBOX by default, it is necessary to disable this behavior by setting displayInfoForAllLayers to false:

 

<featureInfo displayInfoForAllLayers="false" featureInfoBufferMultiplier="1" />

 

Contributors