Hi Ben, Thank you for clarification. Here is the query part of the GET request:
The query that does not work: ?VERSION=2.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=ns1:db_entries&FILTER=<Not><Disjoint><ValueReference>ns1:geometry</ValueReference><gml:Polygon srsName='urn:x-ogc:def:crs:EPSG:4326'><gml:exterior><gml:LinearRing><gml:posList>54.6 8.3 54.7 8.4 54.7 8.5 54.6 8.3</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></Disjoint></Not> This one works: ?VERSION=2.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=ns1:db_entries&FILTER=<PropertyIsEqualTo matchCase='false'><ValueReference>ns1:name</ValueReference><Literal>SkAllnask</Literal></PropertyIsEqualTo> The part after &FILTER= is encoded when sent to the server. In the sample requests (e.g. getFeatureBetween URL), it seems that the part after &FILTER= is wrapped between <Filter xmlns='http://www.opengis.net/ogc'> and </Filter>. I've also tried that but without luck. It is a nice feature that GeoServer lets one choose between permissive and strict modes :-) Cheers, Nhan On 9/11/2013 4:56 AM, Ben Caradoc-Davies wrote: > Nhan, > > GeoServer is by default permissive when it comes to namespaces. > > Please paste the entire request GET URL into an email so we can see > it. Or the query part (after "?") at least if you do not want to > disclose the host. > > Also, note that the schemaLocation in your request is wrong: the WFS 2 > namespace should be followed by the WFS 2.0 schema URL, not GML 3.2: > > xsi:schemaLocation="http://www.opengis.net/wfs/2.0 > http://schemas.opengis.net/gml/3.2.1/gml.xsd" > > Like this (stolen from a WFS 2.0 response): > > xsi:schemaLocation="http://www.opengis.net/gml/3.2 > http://schemas.opengis.net/gml/3.2.1/gml.xsd > http://www.opengis.net/wfs/2.0 > http://schemas.opengis.net/wfs/2.0/wfs.xsd" > > Kind regards, > Ben. > > On 10/09/13 19:50, Nhan Vo wrote: >> Hi list, >> >> I've tried the following filter in the Demo request page and it works >> (even though some elements do not have namespace prefix): >> >> <?xml version="1.0" encoding="UTF-8"?> >> <wfs:GetFeature >> service="WFS" >> version="2.0.0" >> xmlns:wfs="http://www.opengis.net/wfs/2.0" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:gml="http://www.opengis.net/gml/3.2" >> xmlns:fes="http://www.opengis.net/fes/2.0" >> xsi:schemaLocation=" >> http://www.opengis.net/wfs/2.0 >> http://schemas.opengis.net/gml/3.2.1/gml.xsd"> >> <wfs:Query typeNames="ns1:db_entries"> >> <fes:Filter> >> <Not> >> <Disjoint> >> <ValueReference>ns1:geometry</ValueReference> >> <gml:Polygon >> srsName='urn:x-ogc:def:crs:EPSG:4326'> >> <gml:exterior> >> <gml:LinearRing> >> <gml:posList>54.6 8.3 54.7 8.4 >> 54.7 >> 8.5 54.6 8.3</gml:posList> >> </gml:LinearRing> >> </gml:exterior> >> </gml:Polygon> >> </Disjoint> >> </Not> >> </fes:Filter> >> </wfs:Query> >> </wfs:GetFeature> >> >> But when I copy the portion: >> <Not> >> <Disjoint> >> <ValueReference>ns1:geometry</ValueReference> >> <gml:Polygon >> srsName='urn:x-ogc:def:crs:EPSG:4326'> >> <gml:exterior> >> <gml:LinearRing> >> <gml:posList>54.6 8.3 54.7 8.4 >> 54.7 >> 8.5 54.6 8.3</gml:posList> >> </gml:LinearRing> >> </gml:exterior> >> </gml:Polygon> >> </Disjoint> >> </Not> >> and use it (after encoded) in a request URL after &FILTER=, it does not >> work, and I receive the error message: >> >> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 >> Index: 0, Size: 0 >> >> I've done the same thing in URLs with other filter 2.0 elements like >> PropertyIsLike and PropertyIsEqualTo and they work for me. Could someone >> give me a hint? Thanks! >> >> >> ------------------------------------------------------------------------------ >> >> >> How ServiceNow helps IT people transform IT departments: >> 1. Consolidate legacy IT systems to a single system of record for IT >> 2. Standardize and globalize service processes across IT >> 3. Implement zero-touch automation to replace manual, redundant tasks >> http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk >> >> _______________________________________________ >> Geoserver-users mailing list >> Geoserver-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> > ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users