[mapserver-users] [non-nasa source] Default GetCapabilities Version Not Working
Rahkonen Jukka (MML)
jukka.rahkonen at maanmittauslaitos.fi
Fri May 25 05:22:34 PDT 2018
Hi,
Version is a mandatory parameter in all other WMS requests except GetCapabilities so your test seems to lead to correct result.
I have never understood why to make GetCapabilities without explicit version number even I do know how the version negotiation is supposed to work. In real life I think it gives just pain and I negotiate by trying first the version that I would like to use and if it fails then something else. However, I made a test with our Mapserver 7.0.6 and it seems to work as supposed. If I do not set wms_getcapabilities_version at all the following request returns WMS 1.3.0 GetCapabilities which is correct because it is the highest version that Mapserver supports
https://xxx.yyy.fi/cgi-bin/wms1?service=WMS&request=getcapabilities
However, I can override the default by adding into WEB – METADATA
"wms_getcapabilities_version" "1.1.1"
Now GetCapabilities without version returns the WMS 1.1.1 version of the document.
There is no need to set "wms_getcapabilities_version" "1.3.0" because that is the default until there is some higher WMS version available but I tested also that it does not make any harm.
You have Mapserver 7.0.1 while I have 7.0.6. Perhaps that makes the difference.
-Jukka Rahkonen-
Lähettäjä: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Cechini, Matthew F. (GSFC-423.0)[Science Systems & Applications, Inc.]
Lähetetty: 25. toukokuuta 2018 14:40
Vastaanottaja: steve.lime at state.mn.us
Kopio: mapserver-users <mapserver-users at lists.osgeo.org>
Aihe: Re: [mapserver-users] [non-nasa source] Default GetCapabilities Version Not Working
Steve,
For some reason I’m not getting responses through the mailing list… but I did see your responses in the archive…
Digging into this further, it looks like our WMS wrapper is setting “VERSION=” when it invokes mapsever… which is an easy fix. However, I was also able to reproduce this through direct mapserv command line access. But that gives me a different error and perhaps the default version feature isn’t supported in this use case.
$> mapserv -nh "QUERY_STRING=LAYERS=MODIS_Fires_All&width=256&height=256&BBOX=-180,-90,180,90&SERVICE=WMS&REQUEST=GetMap&map=/home/user/wms_test/cfg/ 4326.map&TIME=2018144&PRODUCTYEAR=2018&PRODUCTMONTH=05&PRODUCTDAY=24&transparent=trueSRS=EPSG:4326&format=image/png"
<ServiceException>
msWMSDispatch(): WMS server error. Incomplete WMS request: VERSION parameter missing
</ServiceException>
Thanks,
Matt
.................................................................
Matthew Cechini
Contractor, Science Systems and Applications, Inc.
NASA GIBS Systems/Software Engineer
410.205.6272
From: mapserver-users <mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org>> on behalf of Matthew Cechini <matthew.f.cechini at nasa.gov<mailto:matthew.f.cechini at nasa.gov>>
Date: Wednesday, May 16, 2018 at 5:29 PM
To: mapserver-users <mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>>
Subject: [non-nasa source] [mapserver-users] Default GetCapabilities Version Not Working
All,
We are running MapServer version 7.0.1 and attempting to use the MAP > WEB > METADATA > wms_getcapabilities_version configuration value to support GetCapabilities requests that do not supply the VERSION parameter. Unfortunately, even if we do add this value to our mapserver configuration file, we continue to see the following service exception. Any suggestions?
msOWSParseVersionString(): OWS error. Invalid version (). Version must be in the format 'x.y' or 'x.y.z'
Here is our METADATA block:
WEB
METADATA
"wms_enable_request" "GetMap GetCapabilities"
"wms_title" "Some Text"
"wms_abstract" "Some Text"
"wms_onlineresource" "https://our_url?"
"wms_srs" "epsg:4326"
"wms_getcapabilities_version" "1.3.0"
"wms_connectiontimeout" "180"
END
END
Thanks,
Matt
.................................................................
Matthew Cechini
Contractor, Science Systems and Applications, Inc.
NASA GIBS Systems/Software Engineer
410.205.6272
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180525/a46fd3bb/attachment.htm>
More information about the MapServer-users
mailing list