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
>

-- 
Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
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

Reply via email to