Opened 16 years ago

Closed 16 years ago

#2444 closed defect (fixed)

WFS 1.0.0 GetFeature response when no feature is found must be null

Reported by: nsavard Owned by: tomkralidis
Priority: normal Milestone: 5.2 release
Component: WFS Server Version: 5.0
Severity: normal Keywords: OGC, Cite, TEAM, WFS 1.0.0
Cc: assefa

Description

When a GetFeature is issued to a WFS 1.0.0 server and that no feature is found, the response from this server must be null instead of an exception.

This is some information here:

http://mail.opengeospatial.org/pipermail/wfs-dev/2003-January/000098.html


Actual response from the server is:

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.1.1/OGC-exception.xsd">

<ServiceException>

msQueryByRect(): Search returned no results. No matching record(s) found.

</ServiceException>

</ServiceExceptionReport>


The request sent is: http://dev1.lan.mapgears.com/manwe/cgi-bin/mswfs100_ogc_cite? &service=WFS&version=1.0.0&request=GetFeature&typename=cgf:Points& filter=%3Cogc%3AFilter+xmlns%3Aogc%3D%22 http%3A%2F%2Fwww.opengis.net%2Fogc%22+xmlns%3Agml%3D%22 http%3A%2F%2Fwww.opengis.net%2Fgml%22%3E%3Cogc%3ABBOX%3E%3C ogc%3APropertyName%3Egml%3ApointProperty%3C%2F ogc%3APropertyName%3E%3Cgml%3ABox+xmlns%3D%22 http%3A%2F%2Fwww.opengis.net%2Fcite%2FspatialTestSuite%22+ srsName%3D%22EPSG%3A32615%22%3E%3Cgml%3A coordinates%3E500100%2C500000+500200%2C500100%3C%2Fgml%3A coordinates%3E%3C%2Fgml%3ABox%3E%3C%2Fogc%3ABBOX%3E%3C%2F ogc%3AFilter%3E

Change History (10)

comment:1 by dmorissette, 16 years ago

Milestone: 5.2 release

comment:2 by nsavard, 16 years ago

Keywords: OGC Cite TEAM WFS 1.0.0 added

comment:3 by tomkralidis, 16 years ago

Cc: assefa added
Owner: changed from mapserverbugs to tomkralidis
Status: newassigned

Norm: I can't reproduce an exception for the case above. Can you try again and verify?

I did emulate this behaviour when a filter is applied (r7682), so that exception is not returned for no results, just gml:null.

comment:4 by assefa, 16 years ago

Tom,

I had this fix as part of #2451 but I forgot to commit mapwfs.c. Just realized when I got a conflict.

I think we should generate "real" error messages if they happen to be different from "Search returned no results". here is the code:

if( FLTApplyFilterToLayer(psNode, map, iLayerIndex, MS_FALSE) != MS_SUCCESS )

{

ms_error = msGetErrorObj();

if(ms_error->code != MS_NOTFOUND) {

msSetError(MS_WFSERR, "FLTApplyFilterToLayer() failed", "msWFSGetFeature()", pszFilter); return msWFSException(map, "mapserv", "NoApplicableCode", paramsObj->pszVersion);

}

}

I will commit if you do not see any issues. I realize not why we had a different result when running that autotest.

comment:5 by tomkralidis, 16 years ago

Assefa: if the result above is due to a failure in FLTApplyFilterToLayer(), then that's fine, and go ahead.

comment:6 by assefa, 16 years ago

Applied in r7689

comment:7 by tomkralidis, 16 years ago

Thanks Assefa. Norm: can you test and verify?

comment:8 by nsavard, 16 years ago

Tom: Yes, I'll check this morning and come back to you.

comment:9 by nsavard, 16 years ago

Fixed.

Relevant tests were: wfs:test1.0.0-basic-getfeature-filter-spatialoperators-bbox-get-13 to 18 (s0008) wfs:test1.0.0-basic-getfeature-filter-spatialoperators-bbox-post-13 to 18 (s0008)

All these tests passed now.

comment:10 by tomkralidis, 16 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.