<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=gb2312>
<STYLE></STYLE>
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-SIZE: 10pt; COLOR: #000000; PADDING-TOP: 15px; FONT-FAMILY: Arial"
bgColor=#d4d0c8 leftMargin=0 topMargin=0 CanvasTabStop="true" acc_role="text"
name="Compose message area">
<DIV>Hi all!</DIV>
<DIV> </DIV>
<DIV>I'm setting up a WFS server with. It works fine while querying the server
without any filter, but when I put in some filter, it always returns
an exception: "msOGRFileNextShape(): OGR error. Not enough tokens to
complete expression."</DIV>
<DIV> </DIV>
<DIV>The map file looks like:</DIV>
<DIV>MAP</DIV>
<DIV>......</DIV>
<DIV>......</DIV>
<DIV>......</DIV>
<DIV><BR> WEB<BR> MINSCALE 2500<BR> MAXSCALE 85000000</DIV>
<DIV> </DIV>
<DIV> HEADER "header.html"<BR> FOOTER "footer.html"<BR> TEMPLATE "map.html"</DIV>
<DIV> </DIV>
<DIV> IMAGEPATH "/map/tmp/ms_tmp/"<BR> IMAGEURL "/ms_tmp/"<BR></DIV>
<DIV> METADATA<BR> "wms_title" "World"<BR> "wms_onlineresource" "<A
title=http://192.168.0.10:8080/cgi-bin/mapserv?map=/map/maps/en/world.map
href="http://192.168.0.10:8080/cgi-bin/mapserv?map=/map/maps/en/world.map">http://192.168.0.10:8080/cgi-bin/mapserv?map=/map/maps/en/world.map</A>&"<BR> "wms_srs" "EPSG:4326"<BR> "wfs_title"
"GMap WFS Demo Server" ##
REQUIRED<BR> "wfs_onlineresource" "<A
title=http://192.168.0.10:8080/cgi-bin/mapserv?map=/map/maps/en/world.map
href="http://192.168.0.10:8080/cgi-bin/mapserv?map=/map/maps/en/world.map">http://192.168.0.10:8080/cgi-bin/mapserv?map=/map/maps/en/world.map</A>&"
##
Recommended<BR> "wfs_srs"
"EPSG:4326" ## Recommended</DIV>
<DIV> END<BR> END<BR></DIV>
<DIV>......</DIV>
<DIV>......</DIV>
<DIV> </DIV>
<DIV> LAYER<BR> NAME CustomPOI<BR> STATUS OFF</DIV>
<DIV> </DIV>
<DIV> TYPE POINT<BR> CONNECTIONTYPE OGR<BR> CONNECTION "<OGRVRTDataSource><BR> <OGRVRTLayer
name='gdhk_poi'><BR> <SrcDataSource><BR> MYSQL:MapSQL,user=xxxxxx,password=000000,host=192.168.0.8,port=3306,tables=ud<BR> </SrcDataSource><BR> <SrcSQL><BR> SELECT
oid, geom, name, poi_type, description FROM
ud<BR> </SrcSQL><BR> <GeometryType>wkbPoint</GeometryType><BR> </OGRVRTLayer><BR> </OGRVRTDataSource>"<BR> DATA "gdhk_poi"<BR> UNITS METERS<BR> METADATA<BR> "wfs_title"
"CustomPOI"<BR> "gml_featureid" "oid"<BR> "wfs_featureid" "oid"<BR> "gml_include_items"
"all"<BR> #"wfs_filter"
"<PropertyIsEqualTo><PropertyName>oid</PropertyName><Literal>304</Literal></PropertyIsEqualTo>"</DIV>
<DIV> END<BR> DUMP TRUE</DIV>
<DIV> END<BR></DIV>
<DIV>......</DIV>
<DIV>......</DIV>
<DIV> </DIV>
<DIV>END</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>And the query looks like:</DIV>
<DIV><?xml version="1.0" encoding="UTF-8"?><BR><wfs:GetFeature
service="WFS" maxFeatures="6" version="1.0.0"<BR>
outputFormat="GML2"<BR> xmlns:wfs="<A title=http://www.opengis.net/wfs
href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A>"<BR>
xmlns:ogc="<A title=http://www.opengis.net/ogc
href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</A>"<BR>
xmlns:xsi="<A title=http://www.w3.org/2001/XMLSchema-instance
href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A>"<BR>
xsi:schemaLocation="<A title=http://www.opengis.net/wfs
href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A><BR> <A
title=http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
href="http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd</A>"><BR>
<wfs:Query typeName="CustomPOI" ><BR>
<ogc:Filter><BR> <ogc:PropertyIsEqualTo
><BR>
<ogc:PropertyName>oid</ogc:PropertyName><BR>
<ogc:Literal>305</ogc:Literal><BR>
</ogc:PropertyIsEqualTo><BR> </ogc:Filter><BR>
</wfs:Query><BR></wfs:GetFeature><BR></DIV>
<DIV> </DIV>
<DIV>Besides the above, I've tried WFS clients like MapInfo, but whenever I use
filter, the same exception is returned.</DIV>
<DIV> </DIV>
<DIV>Please help!</DIV>
<DIV> </DIV></BODY></HTML>