Overriding WMS parameters for 'strange' WMS servers

Ed McNierney ed at TOPOZONE.COM
Fri Feb 18 09:00:15 EST 2005


Håvard -

I would be cautious about this.  The servers you're dealing with do not meet the specification - the spec is rather simple and straightforward in this area:

"6.4.1 Parameter Ordering and Case

Parameter names shall not be case sensitive, but parameter values shall be case sensitive."

I do not want to encourage the proliferation of broken servers, since that will simply cause more problems for more (compliant) clients, and ultimately confuse potential users of the specification.  I think servers that accept values outside the specification are much less of an issue.

It's not very hard for servers to adhere to this portion of the specification - have you contacted the operators of those servers to report the discrepancy?

        - Ed

Ed McNierney
TopoZone.com

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Havard Tveite
Sent: Friday, February 18, 2005 4:26 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Overriding WMS parameters for 'strange' WMS servers

Bart has filed a bug on the EXCEPTIONS issue.

The other thing I was bringing up was a mechanism for
overriding WMS parameters (both names and values).
As I mentioned in my previous email, not all WMS servers are
OGC WMS compliant in all respects. Case sensitivity problems
(both for parameter names and for parameter values) are not
that uncommon. To have the possibility of overriding both
parameter names and values would be great.

This could be achieved by including the "non-standard" WMS
parameters (names and values) in the CONNECTION string. The
parameters that are not problematic shall be given in the
METADATA section, as usual.

For instance, if there is a case sensitivity problem with
the SRS parameter name and value, it can be included in
the connection-string like this:

CONNECTION "......&Srs=Epsg:32633"

This would, of course, require Mapserver to look more
closely on the CONNECTION string when building up the WMS
request.

If there are no objections, I would like to file this as
an enhancement bug.

Håvard

Bart van den Eijnden wrote:
> Hi Havard,
>
> looking at the source code, Mapserver WMS client, always uses the inimage
> type of exceptions in its WMS request:
>
>         if (nVersion >= OWS_1_1_0)
>             pszExceptionsParam = "application/vnd.ogc.se_inimage";
>         else
>             pszExceptionsParam = "INIMAGE";
>
> But, application/vnd.ogc.se_inimage is an *optional* exception format in
> the WMS spec, so I think your idea would be good of being able to override
> this as a user. This is a necessary enhancement, since the default
> requested exception format is an optional one, and I would suggest you to
> open an enhancement bug for this in the Mapserver bugzilla. Something like
> wms_exception_format/ows_exception_format METADATA.
>
> This may also involve some more error handling in Mapserver WMS client
> though, since it is not expecting XML type of exceptions for GetMap right
> now. So it might not be as straightforward as it looks to implement this.
>
> Best regards,
> Bart
>
>
>>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.
...

--
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