Exception reporting |
In the event that a web feature service encounters an error while processing a request or receives an unrecognized request, it shall generate an XML document indicating that an error has occurred.
OGC-exception.xsd is as follows:
A <ServiceExceptionReport> element can contain one or more WFS processing exceptions. The mandatory version attribute is used to indicate the version of the service exception report schema. For this version of the specification, this value is fixed at 2.0.0.
Individual exception messages are contained within the <ServiceException> element. The optional code attribute may be used to associate an exception code with the accompanying message. The optional locator attribute may be used to indicate where an exception was encountered in the request that generated the error.
The following is an example of an exception report. This exception indicates that the VERSION parameter is set to 200, but not 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>No service at version 200</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>