[mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config?
Rahkonen Jukka (MML)
jukka.rahkonen at maanmittauslaitos.fi
Thu Mar 12 08:32:41 PDT 2015
Hi James,
You are right with the version negotiation but if you want to avoid troubles in real life you should not trust that it works as supposed. But in your case Mapserver behaves as it should. Browser do not know how to negotiate and Mapserver sends WFS 1.1.0 GetCapabilities as an answer to your request which lacks the version. 1.1.0 is the highest version that your Mapserver supports and thus the response is correct.
In an attachment is a minimal mapfile for WFS 1.1.0 which emits no warnings into GetCapabilities. It works with the states.shp shapefile which comes with the demo data when you download Geoserver. Compare with your own mapfile and I believe that you will find what breaks it. At least you use a non-existing metadata in "WFS_OWS" "EPSG:4326"
Tested with Mapserver 7.0-beta and WFS 1.0.0, 1.1.0, 2.0.0, and without "&version=".
-Jukka Rahkonen-
-----Alkuperäinen viesti-----
Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Passmore, James H.
Lähetetty: 12. maaliskuuta 2015 17:06
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: Re: [mapserver-users] Odd warning in WFS GetCapabilities ~ what's missing in the config?
Thanks to Jeff and Jukka for commenting on this.
> You are missing the required parameter VERSION in your request. If I
> add it to your request I get no warnings:
> http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/
> ows?service=WFS&request=GetCapabilities&VERSION=1.0.0
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> http://www.gatewaygeomatics.com/
>
> Hi Jeff,
>
> If you use &version=1.1.0 you'll see the warnings:
>
> http://194.66.252.155/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in2/
> ows?service=WFS&request=GetCapabilities&VERSION=1.1.0
>
>
> -Jukka-
>
So as I understand it to answer the original question, is there anything wrong with the config, the answer here is no, and the error message is indeed in error!
MapServer is expecting a version number in the request, so the error message should perhaps reflect this facet.
However both the WFS 1.0.0 and WFS 1.1.0 tell me that the version parameter is optional, so Mapserver shouldn't have this expectation.
For example:
Web Feature Service Implementation Specification, Version: 1.0.0
OGC 02-058
12.2 Request
...
The service attribute is described in section 7.8. The version attribute, unlike the normal case, is not mandatory since a client application may not have apriori knowledge about what versions a server may support. The client and the server will need to apply the rules of version negotiation as described in Section 6.2.4.
...
and
Web Feature Service Implementation Specification, Version: 1.1.0
OGC 04-094
6.2.4 Version number negotiation
An OWS Client may negotiate with a Service Instance to determine a mutually agreeable specification version. Negotiation is performed using the GetCapabilities operation [sec. 13] according to the following rules.
All Capabilities XML must include a protocol version number. In response to a GetCapabilities request containing a version number, a web feature service must either respond with output that conforms to that version of the specification, or negotiate a mutually agreeable version if the requested version is not implemented on the server. If no version number is specified in the request, the server must respond with the highest version it understands and label the response accordingly.
Cheers
James
This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: states_wfs.map
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150312/01342daa/attachment.ksh>
More information about the MapServer-users
mailing list