[Geoserver-devel] [jira] Created: (GEOS-1282) BBOX filter without PropertyName element throws a NullPointerException

BBOX filter without PropertyName element throws a NullPointerException
----------------------------------------------------------------------

                 Key: GEOS-1282
                 URL: http://jira.codehaus.org/browse/GEOS-1282
             Project: GeoServer
          Issue Type: Bug
          Components: WFS
    Affects Versions: 1.5.2
         Environment: Ubuntu
            Reporter: Tim Schaub
            Assignee: Andrea Aime
            Priority: Minor
             Fix For: 1.5.2a

Of BBOX filters, the Filter Encoding 1.1 spec says "If the optional <propertyName> element is not specified, the calling service must
determine which spatial property is the spatial key and apply the BBOX operator
accordingly."

If a get feature request is posted with no PropertyName element, the following service exception is thrown:
java.lang.RuntimeException: Parsing failed for BBOX: java.lang.NullPointerException

If a get feature request is posted with an empty PropertyName element, all works well. Not sure what the spec text and xsd actually intends, but if it is invalid to exclude the PropertyName element, this should be a validation error.

Works:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot;
                service="WFSV" version="1.0.0">
    <wfs:Query typeName="topp:archsites">
        <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
            <ogc:BBOX>
                <wfs:PropertyName></wfs:PropertyName>
                <gml:Box xmlns:gml="http://www.opengis.net/gml&quot;
                         srsName="http://www.opengis.net/gml/srs/epsg.xml#26713&quot;&gt;
                    <gml:coordinates>598528.1966666667,4923436.016666667 603196.0466666666,4927550.64</gml:coordinates>
                </gml:Box>
            </ogc:BBOX>
        </ogc:Filter>
    </wfs:Query>
</wfs:GetFeature>

Fails:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs&quot;
                service="WFSV" version="1.0.0">
    <wfs:Query typeName="topp:archsites">
        <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
            <ogc:BBOX>
                <gml:Box xmlns:gml="http://www.opengis.net/gml&quot;
                         srsName="http://www.opengis.net/gml/srs/epsg.xml#26713&quot;&gt;
                    <gml:coordinates>598528.1966666667,4923436.016666667 603196.0466666666,4927550.64</gml:coordinates>
                </gml:Box>
            </ogc:BBOX>
        </ogc:Filter>
    </wfs:Query>
</wfs: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