Exception reporting

Feedback


When the WFS service encounters an error while processing a request, or receives an invalid request, the WFS service generates an XML document that describes to the client application or user why the request is invalid.

The owsExceptionReport.xsd reads as follows:

The ExceptionReport element can contain one or more WFS handling exceptions, which are specified by the Exception element. Use the mandatory attribute 'version' to represent the version of the service exception report schema. For WFS 2.0.0, the value is fixed as "2.0.0".

The individual exception information is contained in the ExceptionText element, which uses its mandatory code attribute to associate the exception code with the corresponding information. The optional locator attribute can be used to indicate which part of the request went wrong and generated an exception.

The following is an example of an exception report. This exception report indicates that because the value of the VERSION parameter is set to 200 instead of Error exception generated by 2.0.0.

<ows:ExceptionReport xmlns:wfs="http://www.opengis.net/wfs/2.0"

    xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink"

    xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2"

    version="2.0.0">

    <ows:Exception exceptionCode="VersionNegotiationFailed"

        locator="">

        <ows:ExceptionText>There is no service with version 200 available</ows:ExceptionText>

    </ows:Exception>

</ows:ExceptionReport>