JAVA Mapscript, WMS Layer Exceptions

Oliver Wesp wesp at GDV.COM
Fri Sep 14 07:13:02 PDT 2007


Dear List,

I'm running an application with java mapscript on tomcat 5.0.28. My 
mapfile contains  wms layers dynamically set by the client. So I don't 
have control over the server that is used. The problem is everytime a 
server returns a xml exception tomcat returns an internal server error 
(error 500) on map.draw() containing the xml exception from the remote 
server. The exception is directly returned to the client.

Now I was looking for a possibility to catch errors by checking the 
result of the wms request prior to map.draw() and disabeling the wms 
layer in case of a failure.
I thought OWSRequest could maybe do the trick by sending the request to 
my map via OWSRequest checking the content type and disabeling my wms 
layer in case of a xml exception. Unfortunately (some would say not 
surprisingly) map.OWSDispatch(req) calls for map.draw() resulting in the 
same error 500. I don't have the chance to do any further processing. Is 
this behaviour intended? Schould'nt map.OWSRequest return MS_FAILURE?

Any ideas to come around this and catch these exceptions?
Any help is appreciated.

best regards,
Oliver

-- 
Dipl.-Geogr. Oliver Wesp
GDV Gesellschaft für geografische Datenverarbeitung mbH
Binger Str. 49-51
55218 Ingelheim am Rhein
Germany
Fon 049(0)6132-7148-18
Fax 049(0)6132-7148-28
www.gdv.com
Sitz der Gesellschaft: Ingelheim
Amtsgericht Mainz HRB 23123
Gerichtsstand Mainz
Geschäftsführer: Thomas Riehl, Dirk Hübener



More information about the MapServer-users mailing list