Home > other >  how to change Geoserver 2.8.2 WMS exception format
how to change Geoserver 2.8.2 WMS exception format

Time:12-03

I want to change the exception format of Geoserver 2.8.2 WMS from default XML to inimage or blank. The docu states that this is possible (https://docs.geoserver.org/latest/en/user/services/wms/reference.html#exceptions), but does not tell how or where. Could anybody please tell me?

Thanks in advance!

CodePudding user response:

The format can be changed only while performing a GetMap request (it cannot be configured, I believe the standard mandates the usage of XML exceptions by default).

When issuing a GetMap request, add the key value pair &EXCEPTIONS=application/vnd.ogc.se_inimage or &EXCEPTIONS=application/vnd.ogc.se_blank in the URL.

E.g.:

https://gs-main.geosolutionsgroup.com/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:giant_polygon&bbox=-180.0,-90.0,180.0,90.0&width=768&height=384&srs=EPSG:4326&styles=foobar&format=image/png&EXCEPTIONS=application/vnd.ogc.se_inimage

(should return an image saying that the foobar style does not exist)

  • Related