I have a MapServer (MS4W on Windows) setup with WFS in a mapfile. I cannot load WFS layers from this MapServer, they all return this warning in QGIS:
WARNING Analysis of DescribeFeatureType response failed for url pageSize='0' pagingEnabled='true' preferCoordinatesForWfsT11='false' srsname='EPSG:4326' typename='ms:NAVY' url='http://localhost:8080/cgi-bin/mapserv.exe?map=c:/ms4w/apps/craccen_dev_map/htdocs/craccen_wfs.map' version='2.0.0': Cannot find schema root element
I'm pretty sure MapServer is not the problem as there are no errors in the log file, AND, if I type the request URL into a web browser I get the correct response.
This is my map file that defines the WFS service:
MAP
NAME "CRACCEN_WFS"
STATUS ON
SIZE 400 300
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH "./shape"
IMAGECOLOR 255 255 255
CONFIG "MS_ERRORFILE" "C:\\ms4w\\apps\\craccen_dev_map\\wfs.log"
DEBUG 5
WEB
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"wfs_title" "CRACCEN Test WFS Server"
"wfs_onlineresource" "http://localhost:8080/cgi-bin/mapserv.exe?map=c:\ms4w\apps\craccen_dev_map\htdocs\craccendev.map"
"wfs_srs" "EPSG:4326 EPSG:4269 EPSG:3978 EPSG:3857"
"wfs_abstract" "Open Source Information"
"wfs_enable_request" "*"
END
END
PROJECTION
"init=epsg:4326"
END
OUTPUTFORMAT
NAME "geojson"
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json; subtype=geojson"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
FORMATOPTION "LCO:RFC7496=YES"
END
##############
#Naval Bases
LAYER
NAME "NAVY"
METADATA
"wfs_title" "Naval Bases"
"wfs_srs" "EPGS:4326"
"gml_include_items" "all"
"gml_featureid" "ID"
"wfs_enable_request" "*"
"wfs_getfeature_formatlist" "geojson"
END
TYPE POINT
STATUS ON
DATA "u_naval_bases"
PROJECTION
"init=epsg:4326"
END
END #layer
Any thoughts on what could be happening?
shp2img -m craccen_dev_map -o ttt.png -all_debug 3
Then, once your data is appearing properly there, execute a GetCapabilities request, and examine the response (remove any 'warning' messages). Question: what version of MS4W is this? (executemapserv -v
to find out) Make sure you are using MS4W 4.0.5 or more recent (MS4W 5.0 is in beta release mode now). Finally, thanks for using MS4W ! :) -jeffwfs_getfeature_formatlist
, for this test. (first see if you can get valid GML back, first before trying other crazy formats) Then try that GetFeature request inside QGIS, to see if the GML loads. Have fun. :) -jeffhttp://localhost:8080/cgi-bin/mapserv.exe?map=c:\ms4w\apps\craccen_dev_map\htdocs\craccendev.map&SERVICE=WFS&version=2.0.0&request=DescribeFeatureType&TYPENAMES=ms:NAVY
?