[webmap-discuss] mapserver and xml respons

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Thu Dec 14 07:55:33 EST 2006


Btw, there seems to be a method on XmlHttpRequest called overrideMimeType
which might solve your problem. I don't know how cross-browser this is
though.

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl


--------- Oorspronkelijk bericht --------
Van: webmap-discuss at mail.osgeo.org
Naar: webmap-discuss at mail.osgeo.org <webmap-discuss at mail.osgeo.org>
Onderwerp: Re: [webmap-discuss] mapserver and xml respons
Datum: 14/12/06 10:26

> This is the way OGC defines it in WMS 1.1.X. In later versions they use
> text/xml again.
> 
> So Mapserver is doing the right thing according to the spec. Nothing much
to
> be done about it I guess.
> 
> Best regards,
> Bart
> 
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
> 
> 
> --------- Oorspronkelijk bericht --------
> Van: webmap-discuss at mail.osgeo.org
> Naar: webmap-discuss at mail.osgeo.org &lt;webmap-discuss at mail.osgeo.org&gt;
> Onderwerp: [webmap-discuss] mapserver and xml respons
> Datum: 14/12/06 09:36
> 
> &gt; Hi all,
> &gt; 
> &gt; I'm wondering how to solve the following problem:
> &gt; I've got a mapbuilder/mapserver setup where mapserver is setup with
> &gt; relative paths, if I request a capabilities doc:
> &gt; &amp;lt;option
> &gt;
>
value=&amp;quot;javascript:config.loadModel('wmsCapTemplate','/cgi-bin/edugis/mapserv.cgi?map=maps/edugis/cbs.map&amp;amp;amp;version=1.1.0&amp;amp;amp;&amp;amp;amp;request=GetCapabilities&amp;amp;amp;&amp;amp;amp;service=WMS')&amp;quot;&amp;gt;
> &gt; I'm talking directly to mapserver and it gives me a capabilities doc
> &gt; with content-type:
> &gt; application/ogc.vnd.wms_xml which my browser does not understand as
xml.
> &gt; So my XmlHttpRequest bails out with a no XMLResponse error and
> &gt; mapbuilder cannot parse the capabilities doc.
> &gt; 
> &gt; I'm not sure why mapserver returns this content-type, as far as I
know
> &gt; this is not supported by most browsers (IE). FF1.5 is slightly
smarter,
> &gt; it recognises the &amp;lt;?xml first line and parses the the doc
anyway, but I
> &gt; end up with a namespaces hell for some odd reason.
> &gt; 
> &gt; The usual solution for mapbuilder is to use a proxy which sets the
> &gt; content type to text/xml and everything works fine. However for my
> &gt; particular setup I cannot use the proxy, so I rebuild mapserver with
a
> &gt; hardcoded content-type 'text/xml'.
> &gt; 
> &gt; My questions to you all are:
> &gt; -anyone came across this problem before?
> &gt; -is there a way to make browsers understand
application/ogc.vnd.wms_xml?
> &gt; -is it possible to set mapserver's content-type to text/xml
> &gt; -if not WHY NOT?
> &gt; 
> &gt; Regards,
> &gt; Steven
> &gt; 
> &gt; -- 
> &gt; Geodan S&amp;amp;R Amsterdam
> &gt; 
> &gt; -------------------------------------
> &gt; Geodan S&amp;amp;R
> &gt; President Kennedylaan 1
> &gt; 1079 MB Amsterdam (NL)
> &gt; -------------------------------------
> &gt; Tel: +31 (0)20 - 5711 311
> &gt; Fax: +31 (0)20 - 5711 333
> &gt; -------------------------------------
> &gt; E-mail: steven.ottens at geodan.nl
> &gt; Website: www.geodan.nl
> &gt; Disclaimer: www.geodan.nl/disclaimer
> &gt; -------------------------------------
> &gt; 
> &gt; 
> &gt; 
> &gt; ---------------------------------------------------------------------
> &gt; To unsubscribe, e-mail: webmap-discuss-unsubscribe at mail.osgeo.org
> &gt; For additional commands, e-mail: webmap-discuss-help at mail.osgeo.org
> &gt; 
> &gt; 
> &gt; 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webmap-discuss-unsubscribe at mail.osgeo.org
> For additional commands, e-mail: webmap-discuss-help at mail.osgeo.org
> 
> 
> 







More information about the Mail_webmap-discuss mailing list