<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>I figure I've missed something obvious in the mapfile, but I can't see it... can anyone else see why WMS works for this layer but WFS doesn't? GetCapabilities works fine for both WMS & WFS.<br><br>I have a mapfile, (MS v5.6.6.) with a layer set up as both WMS & WFS, accessible from:<br><a
href="http://wms-dev.niwa.co.nz/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/mafbnz/bnz_demo.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-36.855397,174.740902,-36.813416,174.798964&CRS=EPSG:4326&WIDTH=485&HEIGHT=351&LAYERS=Surveillance_native&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE">http://boi.wms.niwa.co.nz/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/mafbnz/bnz_demo.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-36.855397,174.740902,-36.813416,174.798964&CRS=EPSG:4326&WIDTH=485&HEIGHT=351&LAYERS=Surveillance_native&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE</a><br><br>(for context you can include the coastpoly layer as well)<br><br>As a WMS, it works fine, all points rendered as expected, eg, the URL above in a browser. As a WFS, it returns an empty dataset. The XML from the WFS connection:<br><a
href="%20http://wms-dev.niwa.co.nz/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/mafbnz/bnz_demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=Surveillance_native"> http://boi.wms.niwa.co.nz/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/mafbnz/bnz_demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=Surveillance_native</a><br>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">is:</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;"><gml:boundedBy><br><gml:null>missing</gml:null><br></gml:boundedBy><br></wfs:FeatureCollection><br><!--StartFragment--></p><p style="margin: 0px; text-indent: 0px;"><br><!--EndFragment--></p><br>The embedded SQL works fine from psql, & it works via WMS.<br>I have "GML_include_items" & "DUMP true" in the layer definition in the mapfile, which is below.<br><br> LAYER<br> NAME "Surveillance_native"<br> TYPE point<br> STATUS on<br> DUMP true<br><br> CONNECTIONTYPE POSTGIS<br> CONNECTION "dbname=xxx user=xxx host=localhost port=5432"<br><br> DATA "geom from (SELECT t.stid as
gid,<br> n.taxon_name as name,<br> s.geom_point as geom<br> FROM surveillance.samples s, <br> public.taxon_names n,<br> surveillance.s_taxa
t<br> WHERE s.site_id = t.site_id<br> and t.key=n.key<br> and n.biosecurity_status = 'Native'<br> ) as myquery using unique gid using srid=4326"<br><br> METADATA<br> "wms_title" "Surveillance_native"<br> "wms_srs" "EPSG:4326"<br> "wfs_title" "Surveillance_native" <br> "wfs_srs"
"EPSG:4326"<br> "wfs_version" "1.0.0"<br> "wfs_typename" "Surveillance_native"<br> "gml_include_items" "all"<br> "wfs_extent" "177 -48 179 -34"<br> END<br><br> CLASS<br> NAME "Surv_native"<br> STYLE<br> SYMBOL "circle"<br> SIZE 5<br> COLOR 255 0 0<br> ANTIALIAS true<br> END<br> END<br><br> PROJECTION<br> "init=epsg:4326"<br> END<br><br> END # layer<br><br><br>Any advice appreciated...<br><br> Thanks,<br><br> Brent Wood<br></td></tr></table>