How do I propagate failures from upstream wms-servers?
Jacolin Yves
yjacolin at FREE.FR
Tue Nov 6 08:52:22 PST 2007
Hi,
Why don't you use
"wms_exceptions_format" "application/vnd.ogc.se_inimage" ?
Regards,
Y.
Le Tuesday 06 November 2007 17:35:17 Trond Michelsen, vous avez écrit :
> Hi.
>
> In my mapfile, I have several layers with connectiontype WMS. Once in
> a while, the WMS-servers that deliver these layers will fail, usually
> due to high load, and return an application/vnd.ogc.se_xml
> exception. In these cases, I'd like mapserver to return an exception
> as well, but instead, mapserver will just log the error message in
> MS_ERRORFILE, and continue drawing the rest of the layers. If there
> are no more layers, it will result in a blank image.
>
> (BTW: I've also noticed the same behaviour if the remote wms-server
> answers with an internal server error)
>
> Here's the layer definition that I use for testing. exception.cgi will
> always return a dummy XML exception.
>
> LAYER
> NAME "exception"
> TYPE RASTER
> STATUS ON
> CONNECTION "http://wms1.oslo.dnmi.no/cgi-bin/exception.cgi"
> CONNECTIONTYPE WMS
> OFFSITE 255 255 254
> METADATA
> "wms_srs" "EPSG:4326"
> "wms_name" "exception"
> "wms_server_version" "1.1.1"
> "wms_formatlist" "image/png"
> "wms_format" "image/png"
> "wms_exceptions_format" "application/vnd.ogc.se_xml"
> END #metadata
> END #layer
>
> Is there something I can do to force mapserver to fail, and return an
> exception if it fails to draw any of the wms-layers?
>
> I'm using mapserver 4.10
>
> $ cgi-bin/mapserv -v
> MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
> SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
--
Yves Jacolin
---
http://softlibre.gloobe.org
More information about the MapServer-users
mailing list