Other Blog Posts
Green INSPIRE WMS Tests with MapServer 8.6
2026-05-08
MapServer has been used in European Geodata Infrastructure for a long time. Building INSPIRE conforming View Services based on OGC WMS is one major field of application. With MapServer 8.6 it is now possible to get the Conformance Class: View Service - WMS test suite of the INSPIRE Validator green.
MapServer 8.6 comes with the new ows_compliance_mode flag for the WEB.METADATA section.
When set to true, two settings are activated:
- Service Exceptions are returned with HTTP status code 200.
This is tested as part of the
GetCapabilitiesRequest Parameters tests of the INSPIRE Profile of ISO 19128 conformance class. - Strict validation of the
TRANSPARENTparameter inGetMapcalls -TRUEorFALSE(all uppercase letters) are the only parameter values allowed. This is tested as part of theGetMapTransparent Parameter tests.
If you already use this existing workaround to get the test for a missing SERVICE parameter in a GetCapabilities request green (at05-getcapabilities-get-capabilities-request-parameter -> http-request-no-service-paramter):
Uncomment or delete the wfs_cite_true line from your mapfile.
This workaround will ensure that a service exception is rendered when the SERVICE parameter is missing, however it will use the wrong HTTP status code (400 Bad Request instead of 200 OK).
You might also want to override the default INSPIRE schema location in order to avoid a test failure where the test complains about a 301 Moved permanently response (instead of following the link to the https version).
This has been possible for a long time with the inspire_schemas_location parameter (however not currently mentionned in the documentation).
WEB
...
METADATA
...
# Set ows|wms|wfs_inspire_capabilities to either 'url' or 'embed' to configure an
# INSPIRE service
"ows_inspire_capabilities" "url"
# Enable strict OGC compliance
"ows_compliance_mode" "true"
# Override the default INSPIRE schemas location.
# This is because the INSPIRE validator will not
# follow a permanent redirect from plain http://
# and throw an error instead.
"inspire_schemas_location" "https://inspire.ec.europa.eu/schemas"
# If you are using an existing workaround for
# successfully testing a missing SERVICE parameter
# in GetCapabilities requests, make sure to
# comment out or delete it:
# "wfs_200_cite" "true"
...
END
END