Hi list,
does Geoserver support passing a Filter in a HTTP GET GetFeature request?
The filter does not seem to get interpreted since the generated SQL does
not contain a WHERE clause.
This is the request:
?service=WFS&request=GetFeature&typename=rwsagi:V_HECTOPUNTEN&filter=<ogc:Filter><ogc:And><ogc:PropertyIsLike
wildCard='*' singleChar='^'
escape='!'><ogc:PropertyName>WEGNUMMER</ogc:PropertyName><ogc:Literal>012*</ogc:Literal></ogc:PropertyIsLike><ogc:PropertyIsLike
wildCard='*' singleChar='^'
escape='!'><ogc:PropertyName>HECTOMTRNG</ogc:PropertyName><ogc:Literal>*</ogc:Literal></ogc:PropertyIsLike></ogc:And></ogc:Filter>&maxfeatures=250
The same filter works in HTTP POST.
Tomcat access log:
145.50.90.102 - - [20/Jul/2006:09:43:48 +0100] "GET
/geoserver/wfs?service=WFS&request=GetFeature&typename=rwsagi:V_HECTOPUNTEN&filter=%3Cogc:Filter%3E%3Cogc:And%3E%3Cogc:PropertyIsLike%20wildCard='*'%20singleChar='^'%20escape='!'%3E%3Cogc:PropertyName%3EWEGNUMMER%3C/ogc:PropertyName%3E%3Cogc:Literal%3E012*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3Cogc:PropertyIsLike%20wildCard='*'%20singleChar='^'%20escape='!'%3E%3Cogc:PropertyName%3EHECTOMTRNG%3C/ogc:PropertyName%3E%3Cogc:Literal%3E*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3C/ogc:And%3E%3C/ogc:Filter%3E&maxfeatures=250
HTTP/1.1" 200 214827
Catalina out:
^@76830164 [FINE] org.geotools.data.jdbc.JDBC1DataStore - sql is SELECT
"OGR_FID", "ORA_GEOMETRY", "WEGNUMMER", "HECTOMTRNG_ORG", "HECTOMTRNG"
FROM "V_HECTOPUNTEN"
Best regards,
Bart
Bart van den Eijnden (OSGIS) wrote:
Hi list,
does Geoserver support passing a Filter in a HTTP GET GetFeature request?
It should. Have you tried it with other filters? What datastore are you using? It may not support the LIKE filter...
Also if you're using GML you need to be sure to define the namespace of the xml - for ogc: I think you should b fine.
Chris
The filter does not seem to get interpreted since the generated SQL does
not contain a WHERE clause.
This is the request:
?service=WFS&request=GetFeature&typename=rwsagi:V_HECTOPUNTEN&filter=<ogc:Filter><ogc:And><ogc:PropertyIsLike
wildCard='*' singleChar='^'
escape='!'><ogc:PropertyName>WEGNUMMER</ogc:PropertyName><ogc:Literal>012*</ogc:Literal></ogc:PropertyIsLike><ogc:PropertyIsLike
wildCard='*' singleChar='^'
escape='!'><ogc:PropertyName>HECTOMTRNG</ogc:PropertyName><ogc:Literal>*</ogc:Literal></ogc:PropertyIsLike></ogc:And></ogc:Filter>&maxfeatures=250
The same filter works in HTTP POST.
Tomcat access log:
145.50.90.102 - - [20/Jul/2006:09:43:48 +0100] "GET
/geoserver/wfs?service=WFS&request=GetFeature&typename=rwsagi:V_HECTOPUNTEN&filter=%3Cogc:Filter%3E%3Cogc:And%3E%3Cogc:PropertyIsLike%20wildCard='*'%20singleChar='^'%20escape='!'%3E%3Cogc:PropertyName%3EWEGNUMMER%3C/ogc:PropertyName%3E%3Cogc:Literal%3E012*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3Cogc:PropertyIsLike%20wildCard='*'%20singleChar='^'%20escape='!'%3E%3Cogc:PropertyName%3EHECTOMTRNG%3C/ogc:PropertyName%3E%3Cogc:Literal%3E*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3C/ogc:And%3E%3C/ogc:Filter%3E&maxfeatures=250
HTTP/1.1" 200 214827
Catalina out:
^@76830164 [FINE] org.geotools.data.jdbc.JDBC1DataStore - sql is SELECT
"OGR_FID", "ORA_GEOMETRY", "WEGNUMMER", "HECTOMTRNG_ORG", "HECTOMTRNG"
FROM "V_HECTOPUNTEN"
Best regards,
Bart
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:1003,44bf433b73321425493344!
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org