Hi,
I'm looking around to see how it would be possible to
support the application/vnd.ogc.se_inimage format for
WMS error reporting.

The interest stems out of the new preview (which I still
haven't commited) and the ability to specify filters in it.
Basically, if you specify a wrong filter, you get back a
blank image with no indication of what was wrong with
the parameters.

Now, the current dispatcher has pluggable exception handlers,
(ServiceExceptionHandler) that answer to the following request:
public abstract void handleServiceException(ServiceException exception, 
Service service, HttpServletRequest request, HttpServletResponse response);

Applying this to a GetMap request is possible, but not exactly
trivial. The main issue is that in order to build the exception
as an image, I would need to get widht/height and image format...
and this would require parsing. So, can I use the parsing
that the dispatcher already does??? Eh, only sometimes.

I mean, if the exception occurred in the map building, yes,
but that's hardly the case, exceptions often occur in parsing
the request :(
So, if the request is a GET request, the exception handler would
have to reparse the three params above, hoping the problem was
not there, and if it was a POST request... well in that case
I'd need to reload the xml again in a dom and use xpath to
access the three params needed (that is, an approach that
disregards whatever else may be broken).

Ouch, this is getting complex, but seems doable... besides a bit:
is the exception handler able to get to the XML of a POST once
the dispatcher has already tried to parse it? I have the
impression that would not be possible? If so, I guess I'll
have to give up the GetMap POST request (which is not very
common) and support application/vnd.ogc.se_inimage only in get ones...

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to