Hi,
working on filters I noticed that a request like:
wfs?request=GetFeature&typeName=topp:states&propertyName=STATE_NAME,LAND_KM,the_geom&outputFormat=GML2&FILTER=<Filter><PropertyIsBetween><PropertyName>topp:LAND_KM</PropertyName><LowerBoundary><Literal>100000</Literal></LowerBoundary><UpperBoundary><Literal>150000</Literal></UpperBoundary></PropertyIsBetween></Filter>
gets parsed just fine, whilst the same one using ogc: prefixes does not,
the filter is not parsed at all and as a result the getFetaure is not
filtered (no error, you just get all the features).
Any XML pro can explain me why POST requests gets parsed fine instead?
I've compared GetFeatureXMLReader with WFSRequestXMLReader and they do
seem to do the same thing... both do parse filters using FilterFilter.
One notable difference is that wfs sample requests do define namespaces,
whilst the usual GET does not..
Cheers
Andrea
I would think the reason is that in a POST request the ogc prefix is usually explicitly bound to the proper namespace, where as in most GET requests like this it is not.
I believe you can still do the namespace binding in the GET and achieve the same results.
-Justin
Andrea Aime wrote:
Hi,
working on filters I noticed that a request like:
wfs?request=GetFeature&typeName=topp:states&propertyName=STATE_NAME,LAND_KM,the_geom&outputFormat=GML2&FILTER=<Filter><PropertyIsBetween><PropertyName>topp:LAND_KM</PropertyName><LowerBoundary><Literal>100000</Literal></LowerBoundary><UpperBoundary><Literal>150000</Literal></UpperBoundary></PropertyIsBetween></Filter>
gets parsed just fine, whilst the same one using ogc: prefixes does not,
the filter is not parsed at all and as a result the getFetaure is not
filtered (no error, you just get all the features).
Any XML pro can explain me why POST requests gets parsed fine instead?
I've compared GetFeatureXMLReader with WFSRequestXMLReader and they do
seem to do the same thing... both do parse filters using FilterFilter.
One notable difference is that wfs sample requests do define namespaces,
whilst the usual GET does not..
Cheers
Andrea
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
!DSPAM:1004,45d0884e236732051017194!
--
Justin Deoliveira
jdeolive@anonymised.com
The Open Planning Project
http://topp.openplans.org
Justin Deoliveira ha scritto:
I would think the reason is that in a POST request the ogc prefix is usually explicitly bound to the proper namespace, where as in most GET requests like this it is not.
I believe you can still do the namespace binding in the GET and achieve the same results.
Indeed, just tried and it works. In order to use ogc and gml prefixes you have to define them. Apparently GML geometries used in spatial
filters cannot be used without the GML prefix, whilst the filters
do work either without prefix, or with prefix and namespace binding.
I'm setting up WFS GET examples for the release, so that people
have some reference ones that do work.
Cheers
Andrea