<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Here is a WFS GetFeature request that work for me against my Mapserver installation:</DIV>
<DIV>&nbsp;</DIV>
<DIV><A href="http://myserver/cgi-bin/agbwfs.exe?farmid=AS00001&amp;request=getfeature&amp;typename=farm&amp;service=wfs&amp;version=1.0.0&amp;BBOX=1472102,5119440,1475670,5123000">http://myserver/cgi-bin/agbwfs.exe?farmid=AS00001&amp;request=getfeature&amp;typename=farm&amp;service=wfs&amp;version=1.0.0&amp;BBOX=1472102,5119440,1475670,5123000</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>The typename is just the layer name in the Mapserver map file.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Looking through your map file, you shouldn't have:</DIV>
<DIV>&nbsp;</DIV>
<DIV>CONNECTIONTYPE WFS<BR>CONNECTION "/cgi-bin/mapserv.exe?map=Delhi1_wfs.map&amp;"</DIV>
<DIV>&nbsp;</DIV>
<DIV>in your layer definition, since the Shape file is local. You just need the DATA line. The above two are referencing itself. They should only be used where you are using your Mapserver as a cascading mapservice ie. to bring in data from other Web servers.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Instead of using the OGC filter statements, you could just pass Polygon_nm=Ghaziabad in your URL, and have a FILTER line in your layer definition:</DIV>
<DIV>&nbsp;</DIV>
<DIV>FILTER "WHERE Polygon_nm = '%Polygon_nm%'</DIV>
<DIV>&nbsp;</DIV>
<DIV>That's how I deal with my farmid=AS00001 in my example.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert<BR><BR>&gt;&gt;&gt; sunny74 &lt;sb.ray@hotmail.com&gt; 8/04/2010 2:43 a.m. &gt;&gt;&gt;<BR><BR>Dear Friends,<BR><BR>I am making a WFS GetFeature request on Mapserver.<BR>My url is:<BR><BR><A href="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GETfeature">http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=GETfeature</A><BR>&amp;REQUEST=getfeature&amp;typename=Adminbndy3&amp;Filter=&lt;Filter&gt;&lt;PropertyIsEqualTo&gt;&lt;PropertyName&gt;Polygon_nm&lt;/PropertyName&gt;&lt;Literal&gt;Ghaziabad&lt;/Literal&gt;&lt;/PropertyIsEqualTo&gt;&lt;/Filter&gt;<BR><BR>but I get the error<BR><BR>&lt;ServiceExceptionReport version="1.2.0"<BR>xsi:schemaLocation="http://www.opengis.net/ogc<BR><A href='http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"'>http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"</A>&gt;<BR>?<BR>&lt;ServiceException code="InvalidParameterValue" locator="typename"&gt;<BR><BR>msWFSGetFeature(): WFS server error. TYPENAME 'adminbndy3' doesn't exist in<BR>this server.&nbsp; Please check the capabilities and reformulate your request.<BR>&nbsp; <BR>&lt;/ServiceException&gt;<BR>&lt;/ServiceExceptionReport&gt;<BR><BR>My map file is<BR><BR># Map file created from QGIS project file D:/QGIS<BR>1.3/projects/delhi_trial.qqs.qgs<BR># Edit this file to customize for your map interface<BR># (Created with PyQgis MapServer Export plugin)<BR>MAP<BR>&nbsp; NAME Delhi1_wfs.map<BR>&nbsp; # Map image size<BR>&nbsp; SIZE 600 600<BR>&nbsp; UNITS dd<BR>&nbsp; FONTSET 'fonts.txt'<BR>&nbsp; EXTENT 76.507859 27.613907 78.439621 28.941223<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; 'proj=longlat'<BR>&nbsp;&nbsp;&nbsp; 'ellps=WGS84'<BR>&nbsp;&nbsp;&nbsp; 'datum=WGS84'<BR>&nbsp;&nbsp;&nbsp; 'no_defs'<BR>&nbsp; END<BR><BR>&nbsp; # Background color for the map canvas -- change as desired<BR>&nbsp; IMAGECOLOR 192 192 192<BR>&nbsp; END<BR>&nbsp; # Legend<BR>&nbsp; LEGEND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGECOLOR 255 255 255<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; KEYSIZE 18 12<BR>&nbsp;&nbsp;&nbsp; LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE BITMAP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE MEDIUM<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 89<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp; END<BR><BR>&nbsp; # Web interface definition. Only the template parameter<BR>&nbsp; # is required to display a map. See MapServer documentation<BR>&nbsp; WEB<BR>&nbsp;&nbsp;&nbsp; # Set IMAGEPATH to the path where MapServer should<BR>&nbsp;&nbsp;&nbsp; # write its output.<BR>&nbsp;&nbsp;&nbsp; IMAGEPATH '/tmp/'<BR><BR>&nbsp;&nbsp;&nbsp; # Set IMAGEURL to the url that points to IMAGEPATH<BR>&nbsp;&nbsp;&nbsp; # as defined in your web server configuration<BR>&nbsp;&nbsp;&nbsp; IMAGEURL '/tmp/'<BR><BR>&nbsp;&nbsp;&nbsp; # WFS server settings<BR>&nbsp;&nbsp;&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wfs_title'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Delhi1_wfs.map'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wfs_onlineresource'&nbsp; '/cgi-bin/mapserv.exe?map=Delhi1_wfs.map&amp;'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wfs_srs'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'EPSG:4326'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'queryable'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'true'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #'gml_include_items'&nbsp;&nbsp;&nbsp; 'all'<BR>&nbsp;&nbsp;&nbsp; END<BR><BR>&nbsp;&nbsp;&nbsp; #Scale range at which web interface will operate<BR>&nbsp;&nbsp;&nbsp; # Template and header/footer settings<BR>&nbsp;&nbsp;&nbsp; # Only the template parameter is required to display a map. See<BR>MapServer documentation<BR>&nbsp; END<BR><BR>&nbsp; LAYER<BR>&nbsp;&nbsp;&nbsp; NAME "Adminbndy3"<BR>&nbsp;&nbsp;&nbsp; TYPE POLYGON<BR>&nbsp;&nbsp;&nbsp; CONNECTIONTYPE WFS<BR>&nbsp;&nbsp;&nbsp; CONNECTION "/cgi-bin/mapserv.exe?map=Delhi1_wfs.map&amp;"<BR>&nbsp;&nbsp;&nbsp; DATA 'D:/Delhi_NCR_boundaries/Delhi/Adminbndy3.shp'<BR>&nbsp;&nbsp;&nbsp; METADATA<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wfs_title'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Adminbndy3'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'gml_featureid'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Polygon_nm'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'gml_include_items'&nbsp;&nbsp; 'all'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wfs_typename'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Adminbndy3'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wfs_version'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '1.0.0'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wfs_request_method'&nbsp; 'GET'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'wfs_connectiontimeout' '60'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "wfs_maxfeatures"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "1"<BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; DUMP TRUE<BR><BR>&nbsp;&nbsp;&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; 'proj=longlat'<BR>&nbsp;&nbsp;&nbsp; 'ellps=WGS84'<BR>&nbsp;&nbsp;&nbsp; 'datum=WGS84'<BR>&nbsp;&nbsp;&nbsp; 'no_defs'<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME 'Adminbndy3' <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL 0 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 2 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 255 127<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp; END<BR><BR>END<BR><BR>Although getfeature is not working getcapabilities is working,url is<BR><BR><BR><A href="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;&amp;REQUEST=getcapabilities">http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;&amp;REQUEST=getcapabilities</A><BR><BR>The response is:<BR><BR>&lt;WFS_Capabilities version="1.0.0" updateSequence="0"<BR>xsi:schemaLocation="http://www.opengis.net/wfs<BR><A href='http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd"'>http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd"</A>&gt;<BR>?<BR>&lt;!--<BR>MapServer version 5.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP<BR>OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG<BR>SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER<BR>SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT<BR>SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS<BR>SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=JPEG INPUT=POSTGIS INPUT=OGR<BR>INPUT=GDAL INPUT=SHAPEFILE <BR>--&gt;<BR>?<BR>&lt;Service&gt;<BR>&lt;Name&gt;MapServer WFS&lt;/Name&gt;<BR>?<BR>&lt;!--<BR>WARNING: Mandatory metadata '..._title' was missing in this context. <BR>--&gt;<BR>&lt;Title&gt;Delhi1_wfs.map&lt;/Title&gt;<BR>?<BR>&lt;OnlineResource&gt;<BR><BR><BR><BR>?<BR><BR>?<BR><BR>?<BR><BR>?<BR><BR>?<BR><BR><BR><A href='http://onlineResource="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;"/'>onlineResource="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;"/</A>&gt;<BR>&lt;/HTTP&gt;<BR>&lt;/DCPType&gt;<BR>?<BR>&lt;DCPType&gt;<BR>?<BR>&lt;HTTP&gt;<BR>&lt;Post<BR>onlineResource="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;"/&gt;<BR>&lt;/HTTP&gt;<BR>&lt;/DCPType&gt;<BR>&lt;/GetCapabilities&gt;<BR>?<BR>&lt;DescribeFeatureType&gt;<BR>?<BR>&lt;SchemaDescriptionLanguage&gt;<BR>&lt;XMLSCHEMA/&gt;<BR>&lt;/SchemaDescriptionLanguage&gt;<BR>?<BR>&lt;DCPType&gt;<BR>?<BR>&lt;HTTP&gt;<BR>&lt;Get<BR>onlineResource="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;"/&gt;<BR>&lt;/HTTP&gt;<BR>&lt;/DCPType&gt;<BR>?<BR>&lt;DCPType&gt;<BR>?<BR>&lt;HTTP&gt;<BR>&lt;Post<BR>onlineResource="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;"/&gt;<BR>&lt;/HTTP&gt;<BR>&lt;/DCPType&gt;<BR>&lt;/DescribeFeatureType&gt;<BR>?<BR>&lt;GetFeature&gt;<BR>?<BR>&lt;ResultFormat&gt;<BR>&lt;GML2/&gt;<BR>&lt;/ResultFormat&gt;<BR>?<BR>&lt;DCPType&gt;<BR>?<BR>&lt;HTTP&gt;<BR>&lt;Get<BR>onlineResource="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;"/&gt;<BR>&lt;/HTTP&gt;<BR>&lt;/DCPType&gt;<BR>?<BR>&lt;DCPType&gt;<BR>?<BR>&lt;HTTP&gt;<BR>&lt;Post<BR>onlineResource="http://localhost:81/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/Delhi/Delhi1_wfs.map&amp;"/&gt;<BR>&lt;/HTTP&gt;<BR>&lt;/DCPType&gt;<BR>&lt;/GetFeature&gt;<BR>&lt;/Request&gt;<BR>&lt;/Capability&gt;<BR>?<BR>&lt;FeatureTypeList&gt;<BR>?<BR>&lt;Operations&gt;<BR>&lt;Query/&gt;<BR>&lt;/Operations&gt;<BR>&lt;/FeatureTypeList&gt;<BR>?<BR>&lt;ogc:Filter_Capabilities&gt;<BR>?<BR>&lt;ogc:Spatial_Capabilities&gt;<BR>?<BR>&lt;ogc:Spatial_Operators&gt;<BR>&lt;ogc:Equals/&gt;<BR>&lt;ogc:Disjoint/&gt;<BR>&lt;ogc:Touches/&gt;<BR>&lt;ogc:Within/&gt;<BR>&lt;ogc:Overlaps/&gt;<BR>&lt;ogc:Crosses/&gt;<BR>&lt;ogc:Intersect/&gt;<BR>&lt;ogc:Contains/&gt;<BR>&lt;ogc:DWithin/&gt;<BR>&lt;ogc:BBOX/&gt;<BR>&lt;/ogc:Spatial_Operators&gt;<BR>&lt;/ogc:Spatial_Capabilities&gt;<BR>?<BR>&lt;ogc:Scalar_Capabilities&gt;<BR>&lt;ogc:Logical_Operators/&gt;<BR>?<BR>&lt;ogc:Comparison_Operators&gt;<BR>&lt;ogc:Simple_Comparisons/&gt;<BR>&lt;ogc:Like/&gt;<BR>&lt;ogc:Between/&gt;<BR>&lt;/ogc:Comparison_Operators&gt;<BR>&lt;/ogc:Scalar_Capabilities&gt;<BR>&lt;/ogc:Filter_Capabilities&gt;<BR>&lt;/WFS_Capabilities&gt;<BR><BR>Can some one correct my Getfeature info url so that I get to retrieve the<BR>desired info from .shp files.My shapefile has the name Adminbndy3 so I have<BR>the same name as typename.<BR><BR>Basically I have created a WMS layer and trying to create this layer atop<BR>that WMS layer so as to show&nbsp; a different color for a particular feature.<BR>I following the example in the link<BR><BR><A href="http://trac.openlayers.org/wiki/Highlighting">http://trac.openlayers.org/wiki/Highlighting</A><BR><A href="http://trac.openlayers.org/wiki/Highlighting">http://trac.openlayers.org/wiki/Highlighting</A> <BR>(the first one)<BR><BR>Does anybody have a working example of any the methods for highlighting<BR>given in the above link.<BR>If yes pls send it across.<BR><BR>Thanks for your attention &amp; efforts.<BR><BR><BR>-- <BR>View this message in context: <A href="http://n2.nabble.com/WFS-GetFeature-on-Mapserver-doesn-t-work-tp4865349p4865349.html">http://n2.nabble.com/WFS-GetFeature-on-Mapserver-doesn-t-work-tp4865349p4865349.html</A><BR>Sent from the OpenLayers Users mailing list archive at Nabble.com.<BR>_______________________________________________<BR>Users mailing list<BR>Users@openlayers.org<BR><A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR></DIV><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by SurfControl plc.  </FONT><A href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.surfcontrol.com</FONT></A></P>
</body></HTML>