mapserver as wms client - gracefully handling errors
Matthew Perry
perrygeo at GMAIL.COM
Mon Jul 24 21:05:24 PDT 2006
Bart,
Thanks for the tip. It did not seem to have any effect, however.
This may be compounded by the fact that another cascaded WMS server in
the chain (the NASA JPL site) is down today. I'll continue
experimenting and let everyone know what I discover.
If anyone has any tips on how to prevent one bad cascaded WMS service
from ruining the entire image request, please let me know.
- matt
On 7/24/06, Bart van den Eijnden (OSGIS) <bartvde at xs4all.nl> wrote:
> Something went wrong with e-mail formatting (cut and paste from OGC
> pdf), for clarity, it should be:
>
> "wms_exceptions_format "application/vnd.ogc.se_blank"
>
> Best regards,
> Bart
>
> Bart van den Eijnden (OSGIS) wrote:
>
> > 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
>
>
--
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net
More information about the MapServer-users
mailing list