[mapserver-users] FW: GetCapabilities always returning version 1.3.0

Sowmya Tiramdasu stiramdasu at lp360.com
Fri Nov 15 06:31:07 PST 2013


Hi Rahkonen, 

Thank you very much for your explanation. I know understand how it is working. But, I am still confused about why it is not working when I make a call with 1.3.0 specifications. 

I am getting this error : "msBuildWMSLayerURL(): WMS connection error. Map Server supports only WMS 1.0.0 to 1.1.1 (please verify the VERSION parameter in the connection string)."

But the GetCapabilities returns the default supported version as 1.3.0. Any more suggestions on ideas on why this is happening will be greatly appreciated. 

Thanks, 
Sowmya. 
-----Original Message-----
From: Rahkonen Jukka [mailto:jukka.rahkonen at mmmtike.fi] 
Sent: Thursday, November 14, 2013 5:23 PM
To: Sowmya Tiramdasu; mapserver-users at lists.osgeo.org
Subject: VS: GetCapabilities always returning version 1.3.0

WMS standard says about version number negotiation

"A WMS client may negotiate with a server to determine a mutually agreeable protocol version. Negotiation isperformed using the GetCapabilities operation (described in 7.2) according to the following rules.
All service metadata shall include a protocol version number and shall comply with the XML DTD or Schema defined for that version. In response to a GetCapabilities request (for which the VERSION parameter is optional)that does not specify a version number, the server shall respond with the highest version it supports.
In responseto a GetCapabilities request containing a version number that the server implements, the server shall send that version. If the server does not support the requested version, the server shall respond with output that conforms to a version it does support, as determined by the following rules:


- If a version unknown to the server and higher than the lowest supported version is requested, the server shallsend the highest version it supports that is less than the requested version.
- If a version lower than any of those known to the server is requested, then the server shall send the lowest version it supports.
- If the client does not support the version sent by theserver, it may either cease communicating with the server or send a new request with a different version number that the client does support

Thus, you ask GetCapabilities without version and you get the highest supported (1.3) and so far everything is all right. But I wonder why people want to drop version out of the request because it really tends to make more trouble thatn good.

Next thing is that you have misunderstood the meaning of "wmw_server_version". It is used when Mapserver reads data from another WMS server (cascading WMS).  There is another metadata item for controlling the version that Mapserver writes into the GetCapabilities and it is "wms_getcapabilities_version" as you can read from http://mapserver.org/ogc/wms_server.html

But I do not understand one thing: why doesn't your GetMap in WMS 1.3.0 work. It should, and it does work for me with MS 6.2.1 even I added that faulty metadata item "wms_server_version" "1.1.1" just like you.

-Jukka Rahkonen-


________________________________
Sowmya Tiramdasu wrote:

Hi,

I have mapserver configured on my IIS server. I configured a project on it . My mapfile looks like this :

MAP
                IMAGETYPE    PNG
                EXTENT        -87.041564905451 34.41840442792049 85.87371108337896 35.01821204159302 # extents in GoogleEarth 4326 projection.
                SIZE           1000 800
                SHAPEPATH      "C:\data"
                SYMBOLSET      "../symbols/symbols35.sym"
                TRANSPARENT ON
                CONFIG "PROJ_LIB" "../proj/nad"
                IMAGECOLOR     0 0 0
                FONTSET        "../fonts/fonts.list"
                PROJECTION
                                "init=epsg:4326"
                END
                WEB
                                IMAGEPATH "C:/inetpub/wwwroot/Images/"
                                IMAGEURL "http://localhost/Images/"
                                METADATA
                                                "wms_enable_request" "*"
                                                "wms_title" "WMS Lidar Server"
                                                "wms_onlineresource" "http://SOWMYAPC/Mapserver/mapserv.exe?map=Map/Madison.map&"
                                                "wms_srs" "epsg:4326"
                                END
    END

    CONFIG "CPL_DEBUG" "ON"
                CONFIG "PROJ_DEBUG" "ON"

                LAYER
                                NAME "MadisonBoundariesDefault"
                                TYPE RASTER
                                STATUS ON
                                CONNECTION "http://localhost/Sheridan/Default.aspx?PROJECT=Madison"
                                CONNECTIONTYPE WMS
                                #OPACITY 50
                                METADATA
                                                "wms_srs" "EPSG:4326 EPSG:26916 "
                                                "wms_name" "Boundaries"
                                                "wms_server_version" "1.1.1"
                                                "wms_format" "image/png"
                                                "wms_style" "Default"
                                                "wms_exceptions_format" "application/vnd.ogc.se_xml"
                                                "wms_latlonboundingbox" "-87.041564905451 34.41840442792049 85.87371108337896 35.01821204159302"
                                                "wms_extent" "5110296.9 557718.4 5122127.3 562697.3 "
                                                "wms_width" "1024"
                                                "wms_height" "1024"
                                END
                                ......

                                DEBUG 5
                END
END.

Now, when I do a get capabilities call on this, This is what I get:

http://localhost/Mapserver/mapserv.exe?map=Map/Madison.map&SERVICE=WMS&REQUEST=GetCapabilities

<?xml version="1.0" encoding="ISO-8859-1"?> <WMS_Capabilities xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://mapserver.gis.umn.edu/mapserver http://SOWMYAPC/Mapserver/mapserv.exe?map=Map/Madison.map&service=WMS&version=1.3.0&request=GetSchemaExtension" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sld="http://www.opengis.net/sld" xmlns="http://www.opengis.net/wms" version="1.3.0"><http://localhost/Mapserver/mapserv.exe?map=Map/Madison.map&SERVICE=WMS&REQUEST=GetCapabilities>
<!-- MapServer version 6.2.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=PDF OUTPUT=KML SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=OPENGL SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE --> <Service><http://localhost/Mapserver/mapserv.exe?map=Map/Madison.map&SERVICE=WMS&REQUEST=GetCapabilities><Name>WMS</Name>
<OnlineResource xlink:href="http
.........

I see that the version is coming up as 1.3.0. From where is this version number coming ? I thought in my mapfile, I gave the "wms_server_version" "1.1.1". I do not understand from where 1.3.0 is coming.

Whereas , if I make a getCapabilities call with the following URL ,
http://localhost/Mapserver/mapserv.exe?map=Map/Madison.map&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1

I get the below xml with version 1.1.1.

<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"
[
<!ELEMENT VendorSpecificCapabilities EMPTY> ]>  <!-- end of DOCTYPE declaration -->

<WMT_MS_Capabilities version="1.1.1">

<!-- MapServer version 6.2.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=PDF OUTPUT=KML SUPPORTS=PROJ SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=OPENGL SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->

I am confused what is my actual WMS version. Any help would be greatly appreciated.

PS: when I do a getMap request in 1.1.1 version specifications , it works fine. But when I try to do a call in 1.3.0 specification  I get the following error : "msBuildWMSLayerURL(): WMS connection error. MapServer supports only WMS 1.0.0 to 1.1.1 (please verify the VERSION parameter in the connection string)."

Thanks,
_______________________________
Sowmya Tiramdasu
QCoherent Software
9668 Madison Blvd., Suite 202
Madison, AL 35758
(256) 461-8289 Telephone
(256) 461-8249 Fax
www.geocue.com<http://www.geocue.com/>




More information about the mapserver-users mailing list