GetCapabilities request results in download mapserv.exe

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Wed Apr 25 11:59:35 PDT 2007


> -----Original Message-----
> From: UMN MapServer Users List 
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Barend Köbben
> Sent: 25 April, 2007 2:46 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] GetCapabilities request 
> results in download mapserv.exe
> 
> As a follow-up to the remarks of Tom Kralidis: It is true 
> that OGC sepcs mention "application/vnd.ogc.wms_xml" as the 
> default MIME type to return. It has also been recognised as a 
> mistake, and WMS 1.3 specs have (I think) returned to 
> "text/html" or "text/xml" as teh default.  However, the WMS 
> 1.1.1 spec also supports a URL parameter EXCEPTIONS that can 
> be issued to ask for expceptions (=error messages) in another 
> MIME type. We use it in our RIMapperWMS, which is a WMS 
> specifically for SVG output, to be able to return error 
> messages in SVG (image/svg+xml) or in straight HTML 
> (text/html) whenever the requesting UA does not support SVG.
>

Yes, OGC:WMS 1.3.0  returns to more browser friendly defaults.  However application/vnd.ogc.wms_xml is listed as the MIME type to declare for WMS Capabilities XML.

w.r.t. Exceptions, see section 6.7:

"Service Exception Report XML shall be valid according to the Service Exception DTD in Annex A.3. In an HTTP environment, the MIME type of the returned XML shall be "application/vnd.ogc.se_xml". Individual error messages appear as <ServiceException> elements within the <ServiceExceptionReport>. The messages can be formatted either as chunks of plain text or, if included in a character data (CDATA) section, as XML-like text containing angle brackets ("<" and ">"), as shown in the example Service Exception Report in Annex A.4."

..Tom
  
> A useful addition for the next version Mapserver would thus 
> be to support at least EXCEPTIONS=text/html. Is there an 
> offical place to request features for upcoming releases?
>  
> --
> Barend Köbben
> International Institute for Geo-information Sciences and  
> Earth Observation (ITC) PO Box 6, 7500AA Enschede (The Netherlands)
> ph: +31-(0)534874253; mobile: +31-(0)622344955 
> http://kartoweb.itc.nl/RIMapper/
> 
> 
> ________________________________
> 
> From: UMN MapServer Users List on behalf of Kralidis,Tom [Burlington]
> Sent: Wed 4/25/2007 17:36
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] GetCapabilities request 
> results in download mapserv.exe
> 
> 
> 
> >
> > Altough this has been handled before:
> > 
> http://www.nabble.com/Enabling-WMS-service-on-MapServer-t3440626.html
> > I'm experiencing the same problem.
> > Yet, when I try to open the resulting mapserv.exe file it 
> opens a (so 
> > it seems) perfect capabilities-document ( not an
> > error-document)
> >
> > Running my app on several pc's results in not showing up the WMS. I 
> > don't know if the above problem is related to this.
> > Anyone experiencing the same ? I try to make mapserver make a 
> > capabilities document which is viewable in the browser...
> >
> 
> The OGC:WMS 1.1.0 and 1.1.1 specifications state that, for 
> GetCapabilities responses, the OGC:WMS server returns a 
> specific MIME type (i.e. application/vnd.ogc.xml (see 
> subclause 6.5.3 of OGC:WMS 1.1.1 at 
> http://portal.opengeospatial.org/files/?artifact_id=1081&versi
on=1&forma
> t=pdf).
> 
> A MIME type is passed from the web server to the client (in 
> your case, a web browser), from which a client can decide how 
> to process it.
> 
> Example 1: if using a web browser, if a web server returns an 
> HTTP Header of "Content-type:image/png", then the web browser 
> will know that this is a PNG image and display it accordingly.
> 
> Example 2: if using a web browser, if a web server returns an 
> HTTP Header of "Content-type:text/html", then the web browser 
> will know that this is an HTML page and display it 
> accordingly (i.e. tables, divs,
> etc.)
> 
> Basically, what is happening is that the OGC:WMS is 
> returning, in the headers of the HTTP response, a MIME type 
> which your web browser does not understand, which usually 
> prompts a dialog box on whether to open or download the 
> content (i.e. Content-type:application/vnd.ogc.wms_xml).
> 
> You could configure your web browser to handle the 
> application/vnd.ogc.wms_xml MIME type a certain way (i.e. 
> open in Notepad, etc.).
> Hope this helps
> 
> ..Tom
> 
> P.S. I've since posted this as an FAQ at 
> http://mapserver.gis.umn.edu/docs/faq/ogc-wms-capabilities-mime-type
> 



More information about the MapServer-users mailing list