Overriding WMS parameters for "strange" WMS servers
Havard Tveite
havard.tveite at UMB.NO
Thu Feb 17 01:10:23 PST 2005
Some WMS server implementations are a little "strange" (perhaps
not fully implementing the standards). It would therefore be
very nice to be able to override the WMS parameters
sent by UMN Mapserver to the remote WMS server.
This time it is the EXCEPTIONS parameter that is causing me
trouble. The WMS server I am trying to use only supports
"application/vnd.ogc.se_xml" (as advertised in the capabilities),
and responds with an error message if Mapservers "default"
EXCEPTIONS=application/vnd.ogc.se_inimage is received. This
causes the Mapserver application to fail.
In other cases I have experienced case sensitivity problems.
It would be nice to be able to override the WMS parameters that
are sent by Mapserver in some way (even if Mapserver behaviour
is according to the standards).
Is there a way to do this? (I have tried to find something in
the documentation, bugzilla and the email archives)
One way of doing this would be to parse the string given in
"CONNECTION", and not providing Mapserver parameters for the
parameters that have already been supplied in the
CONNECTION-string.
If for instance
CONNECTION "http://an.url/a/service?&VERSION=1.1.1\
&LAYERS=layer1&STYLES=default&FORMAT=image/png
makes mapserver generate the request:
http://an.url/a/service?.......&BBOX....&EXCEPTIONS=application/vnd.ogc.se_inimage
Then the following request:
CONNECTION "http://an.url/a/service?&VERSION=1.1.1\
&LAYERS=layer1&STYLES=default&FORMAT=image/png\
&Exceptions=application/vnd.ogc.se_xml"
should make mapserver generate the request:
http://an.url/a/service?.......&Exceptions=application/vnd.ogc.se_xml...&BBOX....
Currently the following is generated:
http://an.url/a/service?.......&Exceptions=application/vnd.ogc.se_xml...&BBOX....&EXCEPTIONS=application/vnd.ogc.se_inimage
(which causes the WMS server I am trying to use to respond
with an error)
--
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 14, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt
More information about the MapServer-users
mailing list