[Mapserver-dev] OGC ServiceExceptions and invalid layers
Tom.Kralidis at CCRS.NRCan.gc.ca
Tom.Kralidis at CCRS.NRCan.gc.ca
Wed Oct 22 11:03:35 EDT 2003
> -----Original Message-----
> From: mapserver-dev-admin at lists.gis.umn.edu
> [mailto:mapserver-dev-admin at lists.gis.umn.edu]On Behalf Of
> Paul Spencer
> Sent: Wednesday, October 22, 2003 10:48 AM
> To: mapserver-dev at lists.gis.umn.edu
> Subject: [Mapserver-dev] OGC ServiceExceptions and invalid layers
>
>
> All,
>
> the purpose of this email is to solicit feedback on how to handle
> exceptions returned from OGC services like WMS and WFS. Currently,
> MapServer WMS and WFS client code obtains the result of a WMS or WFS
> call and uses it as the source for a layer. If the remote WMS/WFS
> returns an error as an XML document (ServiceExceptionReport), this
> causes the layer to be invalid and causes MapServer to fail to render
> the map completely.
>
> With WMS, the only option appears to be requesting errors as INIMAGE,
> which is not always desirable. With WFS, this is not an option (I
> think, please correct me if I am wrong).
>
WMS allows for the following exceptions:
application/vnd.ogc.se_inimage (error text embedding in image)
application/vnd.ogc.se_blank (blank image)
application/vnd.ogc.se_xml (xml response)
This is correct. You cannot request inimage with WFS.
> This issue has come up (again) because we are beginning a series of
> projects involving WFS and filtering (newly added by Assefa). The
> filter support in MapServer is somewhat picky about allowable filter
> types because of differences between the OGC filter model and
> MapServer's internal filtering model. When attempting to apply
> dynamically generated filters, quite often we are
> experiencing service
> exceptions that relate to these differences. We are trying
> to build the
> filters correctly and detect errors before the filter is applied, but
> there are always going to be cases that are either very difficult or
> impossible to catch.
>
> I would like to propose that a different mechanism be put in
> place for
> handling layer errors such as this. I am really only concerned about
> handling OGC service exceptions, but if this is applicable beyond the
> OGC stuff then that would be great (also why I am emailing
> the whole list).
>
For handling exceptions, you can let the client choose what type of errors
they wish
LAYER
TYPE "wms_connection"
NAME "roads"
...
ERRORS "inimage"
#ERRORS "blank" # or this
#ERRORS "se_xml" # or this
...
END
What MapServer can then do, as a client is process accordingly. If xml is
chosen, the error can be fed to an error object, or CGI directive for the
client to check out if they choose to.
This is an another good reason to have more detailed error reporting in
MapServer (I've put a Bugzilla request for this).
> The desired functionality is to have the various OGC clients
> to detect a
> ServiceException and push the information onto the error stack for
> presentation to the user, then disable the layer and allow
> the remaining
> layers to render normally.
>
> Something like this is already done for WMS timeouts (when a
> layer takes
> too long to return a result).
>
> Comments/questions/flames welcome.
>
> Cheers,
>
> Paul
>
> --
> -----------------------------------------------------------------
> |Paul Spencer spencer at dmsolutions.ca |
> |-----------------------------------------------------------------|
> |Applications & Software Development |
> |DM Solutions Group Inc http://www.dmsolutions.ca/|
> -----------------------------------------------------------------
>
> _______________________________________________
> Mapserver-dev mailing list
> Mapserver-dev at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
>
More information about the mapserver-dev
mailing list