Service Exception

Feedback


Upon receiving a request that is invalid according to the rules of the Distributed Computing Platform (DCP) in use, the service may issue an exception of a type valid in that DCP. For example: in the HTTP DCP, if the URL prefix is incorrect an HTTP 404 status code [IETF RFC 2616] is sent.

Upon receiving a request that is invalid according to the relevant OGC Web Services specification, the service shall issue a Service Exception Report. The Report is meant to describe to the client application or its human user the reason(s) that the request is invalid.

The EXCEPTIONS parameter in a request indicates the format in which the Client wishes to be notified of Service Exceptions. The only value of the EXCEPTIONS parameter that is defined for all OGC Web Services is "application/vnd.ogc.se_xml", which means "Service Exception XML." Particular services may define other formats.

Service Exception Report XML shall be valid according to the Service Exception DTD. In an HTTP environment, the MIME type of the returned XML shall be "application/vnd.ogc.se_xml". Individual error messages appear as <ServiceException>elements within the <ServiceExceptionReport>.The messages can be formatted either as chunks of plain text or, if included in a character data (CDATA) section, as XML-like text containing angle brackets.

Service Exceptions may include exception codes. Services shall not use these codes for meanings other than those specified. This specification defines several exception codes; The specific codes and semantics of allowed exceptions may be extended by other OGC Web Service implementation specifications. Clients may use these codes to automate responses to Service Exceptions.