mapserver as wms client - gracefully handling errors

Bart van den Eijnden (OSGIS) bartvde at XS4ALL.NL
Mon Jul 24 15:42:13 EDT 2006


Hi Matthew,

I haven't tested, but the following could work (it should according to 
the WMS spec :-) ):

"wms_exceptions_format "*application/vnd.ogc.se_blank *"


Best regards,
Bart

Matthew Perry wrote:

> Hey folks,
>
> I've set up a mapfile with a number of datasets plus the terraserver
> wms. When browsing parts of the earth not covered by terraserver,
> however, an in-image error message appears:
>
> msDrawMap(): WMS connection error. Failed to draw WMS layer named
> 'Terraserver_DOQ'. This most likely happened because the
> remote WMS server returned an invalid image, and XML exception or
> another unexpected result in response to the GetMap request. Also
> check and make sure that the layer's connection URL is valid.
>
> I can get the wms client and my wms server to return xml instead of an
> inline error but the real question is, how do I force mapserver to
> simply ignore the cascaded wms when an error occurs so that it can
> still render the other data in the mapfile without returning an
> exception?
>
> Here's my mapfile entry for reference:
>
>
> LAYER
>  NAME "Terraserver_DOQ"
>  STATUS OFF
>  TYPE RASTER
>  GROUP "main"
>  CONNECTIONTYPE WMS
>  CONNECTION "http://terraservice.net/OgcMap.ashx?"
>  DEBUG ON
>  METADATA
>    "wms_srs"    "EPSG:4326"
>    "wms_title"    "Digital_Orthophoto"
>    "wms_name"    "DOQ"
>    "wms_server_version"    "1.1.1"
>    "wms_exceptions_format" "application/vnd.ogc.se_xml"
>    "wms_format"    "image/jpeg"
>    "wms_layers"    "doq"
>  END
>  MINSCALE 10000
>  MAXSCALE 40000
>  PROJECTION
>    "init=epsg:4326"
>  END
> END
>


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl



More information about the mapserver-users mailing list