> -----Original Message----- > From: Charlton Galvarino [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 10 December 2008 14:52 > To: Kralidis,Tom [Ontario]; [email protected] > Subject: RE: [mapserver-users] how to throw a custom ExceptionReport > > Tom, I've thought about this long and hard, and I can't wrap > my head around it. > > > You can use Perl mapscript WxS to intercept and return a custom > > exception. Check out > > http://mapserver.gis.umn.edu/docs/howto/wxs_mapscript for info and > > examples. > > It looks like those examples are doing what I'm doing in the > end . . . dumping out XML. But perhaps what I need > accomplished is a bit trickier? I don't think I explained in > enough detail what I'm doing. > > I have a .map that contains something like: > > # demo.map > LAYER > NAME wind_wave_period_and_direction > PROJECTION > "init=epsg:4269" > END > TYPE RASTER > STATUS OFF > CONNECTION "http://localhost/viz" > CONNECTIONTYPE WMS > METADATA > "ows_title" "wind_wave_period_and_direction" > "wms_extent" "-100 5 -60 50" > "wms_srs" "EPSG:4269" > "wms_name" "ww3dir_info" > "wms_server_version" "1.1.1" > "wms_format" "image/png" > "wms_connectiontimeout" "90" > END > > So what I'm really doing is a cascade WMS request because I'm > asking that .amp for the wind_wave_period_and_direction > layer. http://localhost/mapserv?map=demo.map. > > The thing that I need to throw the error is the viz CGI in > the CONNECTION string above. > > So perhaps my question boils down to . . . > > What could viz spit out so that this WMS request would know > it sees an error via something like > EXCEPTIONS=application/vnd.ogc.se_inimage? What I'm getting > now, instead, is the MapServer error saying that the WMS > returned an XML exception. Well, yes, it did -- but I want > to SEE it! :) >
Looks like Charlton wants to show the ExceptionText from a remote WMS's service exception. I'm not sure you can do this as it stands right now without some custom work. Options/comments: - you'd have to ensure the remote WMS support application/vnd.ogc.se_xml - can you catch an error when doing a remote WMS request from the mapscript object model? Others may have better ideas. Having said this, I think this would be a valuable enhancement to the codebase, i.e. allowing to show cascaded ExceptionReport XML. The ExceptionReport XML model allows for multiplicitity of Exception elements, so we could stack these to show the generic MapServer error, as well as the cascaded, say, WMS Exception/ExceptionText. ..Tom > TIA. > _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
