XML for WFS GetFeature query has invalid filter
-----------------------------------------------

                 Key: GEOT-2112
                 URL: http://jira.codehaus.org/browse/GEOT-2112
             Project: GeoTools
          Issue Type: Bug
          Components: data wfs
    Affects Versions: 2.5.0
         Environment: GeoTools-based WFS client and non-GeoServer based WFS 
server.
            Reporter: Clive Butler


When a DefaultQuery/FeatureReader is created with a filter, the resulting WFS 
GetFeature XML can be invalidly constructed with an extraneous empty filter 
element nested inside the supplied filter. Some WFS servers (ionic for example) 
return a service exception, whereas GeoServer ignores the extraneous element.

Filter:
  [[ GEOM intersects POLYGON ((-81 31.5, -76.5 31.5, -76.5 36, -81 36, -81 
31.5)) ] AND [ USEDESC = Military ]]

XML:
  <?xml version="1.0" encoding="UTF-8"?>

<GetFeature xmlns="http://www.opengis.net/wfs"; 
xmlns:gml="http://www.opengis.net/gml"; xmlns:ogc="http://www.opengis.net/ogc"; 
version="1.0.0" service="WFS" outputFormat="GML2">

  <Query typeName="wfs:Airport">
    <ogc:Filter>
      <ogc:And>
        <ogc:PropertyIsEqualTo>
          <ogc:PropertyName>USEDESC</ogc:PropertyName>
          <ogc:Literal>Military</ogc:Literal>
        </ogc:PropertyIsEqualTo>

        <ogc:Intersects>
          <ogc:PropertyName>GEOM</ogc:PropertyName>
          <gml:Polygon>
            <gml:outerBoundaryIs>
              <gml:LinearRing>
                <gml:coordinates decimal="." cs="," ts=" ">
                  -76.5,36.0 -72.0,36.0 -72.0,40.5 -76.5,40.5 -76.5,36.0
                </gml:coordinates>
              </gml:LinearRing>
            </gml:outerBoundaryIs>
          </gml:Polygon>
        </ogc:Intersects>
      </ogc:And>

      <ogc:Filter>                   <!-- This element should not be present -->
      </ogc:Filter>

    </ogc:Filter>
  </Query>
</GetFeature>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to