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ä: [email protected] 
[mailto:[email protected]] Puolesta Passmore, James H.
Lähetetty: 12. maaliskuuta 2015 17:06
Vastaanottaja: [email protected]
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
MAP
  NAME ""
  STATUS ON
MAXSIZE 5000  
CONFIG "MS_ERRORFILE" "/users/wms/data/ms_errorfiles/wfs_error.txt"
EXTENT -180 -90 180 90
  SIZE 600 600 
  SHAPEPATH "/users/wms/data/tmp/ms_tmp"
  IMAGECOLOR 255 255 255
  UNITS DD
  WEB
    IMAGEPATH "/users/wms/data/tmp/ms_tmp"
    IMAGEURL "/users/wms/data/tmp/ms_tmp"
      METADATA
      "ows_enable_request" "*"
      "ows_abstract" "abstract"      
      "ows_keywordlist" "keywork list"      
      "ows_Fees" "free"
      "ows_accessconstraints" "none"
      "ows_contactorganization" "ACME Inc."
      "ows_service_onlineresource" "http://acme.com";
      "ows_contactperson" "Wile E. Coyote"
      "ows_contactposition" "director"
      "ows_contactvoicetelephone" "+00"
      "ows_contactfacsimiletelephone" "+00"
      "ows_address" "foo"
      "ows_city" "foo"
      "ows_stateorprovince" "foo"
      "ows_postcode" "foo"
      "ows_country" "foo"
      "ows_contactelectronicmailaddress" "foo"
      "ows_hoursofservice" "foo"
      "ows_contactinstructions" "foo"
      "ows_role" "foo"
      "wfs_srs"    "EPSG:4326"

      "wms_onlineresource"    
"http://karttakuva-testi.mmmtike.fi/cgi-bin/mapserv?";
      "wfs_title"    "demo"
     END
  END
    PROJECTION
    "init=epsg:4326" 
  END
  DEBUG 10
  OUTPUTFORMAT
      NAME 'AGG_Q'
      MIMETYPE "image/png"
      DRIVER "AGG/PNG"
      EXTENSION "png"
      IMAGEMODE RGB
      FORMATOPTION "QUANTIZE_FORCE=ON"
      FORMATOPTION "QUANTIZE_DITHER=OFF"
      FORMATOPTION "QUANTIZE_COLORS=256"
  END  
LAYER
        NAME "states"
        STATUS ON
        DATA "/users/wms/data/demo/states"
        TYPE POLYGON
        METADATA
          "wfs_title"    "states"
          "wfs_srs" "EPSG:4326"
          "gml_include_items" "all"
          "wfs_featureid" "STATE_FIPS"
        END
        CLASS
        NAME "states"
        STYLE
        COLOR 200 50 0
        WIDTH 2
        END
        END
        PROJECTION
          "init=epsg:4326" 
        END
  END    
  
 END

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to