<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="Helvetica, Arial, sans-serif">Hi Jeff,<br>
<br>
You really did it! I was searching for missing libs, version
mismatches and wrong path variables but it was as simple as using
the xml file the way you pointed out. <br>
I can confirm that everything works as expected now. I'd like to
point out though (for the record) that the step of <br>
</font><br>
<font face="Helvetica, Arial, sans-serif">ogrinfo wfs-request.xm<br>
<br>
does not only test the file but also prepares it to be used. I
tested using the file without first using ogrinfo but that did not
succeed.<br>
<br>
I still do not understand why this was not needed in Mapserver 6
but anyway the problem is solved.<br>
<br>
Thanks so much for putting in all that effort and time to help so
very quickly. I think this list is one of the greatest strength
of Mapserver and I want to thank everybody who is helping here!<br>
<br>
Best<br>
Lars</font><br>
<div class="moz-signature">
<p style="text-align: left;font-family: Helvetica, Arial;">
SkenData GmbH</p>
<br>
</div>
<div class="moz-cite-prefix">Am 04.04.19 um 19:13 schrieb Jeff
McKenna:<br>
</div>
<blockquote type="cite"
cite="mid:54ac1b00-296f-4d96-20aa-10867e922020@gatewaygeomatics.com">Thanks
for providing the response, which indeed states "only WFS 1.0.0 or
0.0.14".
<br>
<br>
I just followed the GDAL WFS driver page now, and locally was able
to generate a map image with a VERSION=1.1.0 request, with the
following steps:
<br>
<br>
<br>
<br>
- (the following steps are adapted from the GDAL WFS driver page
<a class="moz-txt-link-freetext" href="https://gdal.org/drv_wfs.html">https://gdal.org/drv_wfs.html</a> )
<br>
<br>
- create a new file named "wfs-request.xml"
<br>
<br>
- paste the contents of:
<br>
<br>
<OGRWFSDataSource>
<br>
<br>
<URL><a class="moz-txt-link-freetext" href="http://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1000">http://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&VERSION=1.1.0&MAXFEATURES=1000</a></URL>
<br>
</OGRWFSDataSource>
<br>
<br>
- (notice the escaped "&" as noted on the GDAL WFS driver
page)
<br>
<br>
- make a copy of that file (copy/paste "wfs-request.xml" ) in case
it is overwritten by this process
<br>
<br>
- test this file/connection through the commandline:
<br>
<br>
ogrinfo wfs-request.xml
<br>
<br>
- you should see a response listing the available layers:
<br>
<br>
INFO: Open of `wfs-request.xml'
<br>
using driver `WFS' successful.
<br>
1: continents
<br>
2: cities
<br>
<br>
- now we know the name to use in our MapServer layer "DATA"
parameter, so in this case we will use "continents"
<br>
<br>
- edit your .map file and point your layer to that wfs-request.xml
in the CONNECTION, and set the correct DATA parameter from the
ogrinfo response above, such as:
<br>
<br>
LAYER
<br>
NAME "continents-test"
<br>
TYPE POLYGON
<br>
STATUS ON
<br>
CONNECTION "wfs-request.xml"
<br>
CONNECTIONTYPE OGR
<br>
DATA "continents"
<br>
PROJECTION
<br>
"init=epsg:4326"
<br>
END
<br>
CLASS
<br>
NAME "My Continents"
<br>
STYLE
<br>
COLOR 255 128 128
<br>
OUTLINECOLOR 96 96 96
<br>
END
<br>
END
<br>
END # Layer
<br>
<br>
- (use my small mapfile for testing: <a class="moz-txt-link-freetext" href="https://pastebin.com/GYrXyc9A">https://pastebin.com/GYrXyc9A</a>
)
<br>
<br>
- now finally have MapServer generate a map image from that WFS
version 1.1.0 connection, by testing at the commandline:
<br>
<br>
shp2img -m wfs-110-client.map -o ttt.png -all_debug 5
<br>
<br>
- a file named 'ttt.png' should be generated of the map image, and
at the commandline the response should end with something like:
<br>
<br>
msSaveImage(ttt.png) total time: 0.015s
<br>
msFreeMap(): freeing map at 00228B70.
<br>
freeLayer(): freeing layer at 001F1828.
<br>
shp2img total time: 3.013s
<br>
<br>
*** tested with MS4W 4.0.0 (MapServer 7.4.0-dev, GDAL 2.4.0)
<br>
<br>
Hope that helps,
<br>
<br>
-jeff
<br>
<br>
</blockquote>
<br>
</body>
</html>