Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed exception of WFS if requested feature (by resourceid) does not match the requested feature type (by typenames) #718

Conversation

dstenger
Copy link
Contributor

Previously, when a requested feature (by resourceid) did not match the requested feature type (by typenames) a FeatureCollection was returned.

The WFS 2.0 specification (09-025r1) states that an InvalidParameterValue exception is expected (Chapter 7.9.2.4.1 typeNames parameter, page 34):

For KVP-encoded ad hoc query expressions the typeNames parameter shall be encoded 
using the TYPENAMES keyword (see Table 8). The TYPENAMES parameter is mandatory 
in all cases except when the RESOURCEID parameter is specified. In this case the 
TYPENAMES parameter may be omitted because each feature instance can be 
identified by its resource identifier alone (see 7.2). If both the TYPENAMES and
RESOURCEID parameters are specified then all the feature instances identified by 
the RESOURCEID parameter shall be of the type specified by the TYPENAMES 
parameter; otherwise the server shall raise an InvalidParameterValue exception 
(see OGC 06-121r3:2009, Table 25) where the "locator" attribute 
(see OGC 06-121r3:2009, 8.4) value shall be set to "RESOURCEID".

This fix corrects the behaviour of the WFS and an InvalidParameterValue exception is returned instead of a FeatureCollection for the pictured case.

Following test of the OGC CITE WFS 2.0 test suite [1] is now passed due to this fix:

  • "inconsistent Feature Identifier And Type"

[1] http://cite.opengeospatial.org/teamengine/

… match the requested feature type (by typenames)
@dstenger dstenger added in progress bug error issue and bug (fix) labels Jun 23, 2016
@tfr42 tfr42 added this to the 3.4 milestone Jul 7, 2016
@copierrj copierrj added the needs rebase PR is not up to date and needs rebase label Aug 17, 2016
@tfr42 tfr42 added needs rebase PR is not up to date and needs rebase and removed needs rebase PR is not up to date and needs rebase labels Aug 17, 2016
…odeInconsistentFeatureIdentifierAndType-3577
@lgoltz lgoltz removed the needs rebase PR is not up to date and needs rebase label Aug 22, 2016
@tfr42
Copy link
Member

tfr42 commented Aug 30, 2016

Please enhance this PR to support this for the blob modus as well. See line 969
https://github.com/deegree/deegree3/pull/718/files#diff-0c919f1b05b23e814f31e8211037305bR969

 if ( blobMapping != null ) {
              return queryByIdFilterBlob( filter, sortCrit );
          }

@tfr42 tfr42 added the under review PR under review by TMC member label Aug 30, 2016
…es not match the passed feature type (TYPENAMES) and SQLFeatureStore configuration mode is BLOB
@tfr42 tfr42 modified the milestones: 3.4, 3.4.1 Apr 6, 2018
@tfr42 tfr42 modified the milestones: 3.4.1, 3.4.2 Jun 18, 2018
@copierrj copierrj merged commit bf2450d into deegree:master Jul 6, 2018
@lgoltz lgoltz deleted the exceptionCodeInconsistentFeatureIdentifierAndType-3577 branch December 8, 2022 09:37
@tfr42 tfr42 removed in progress under review PR under review by TMC member labels May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error issue and bug (fix)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants