-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bugfix][wfs] Expand support for 2.0.0 TYPENAMES
Fixes #17872 - WFS 2.0.0 DescribeFeatureType : TypeNames vs TypeName This PR introduces the plural form of TYPENAME for 2.0.0 WFS servers, with some additional logic to allow for 2.0.0 servers that only support TYPENAME for DescribeFeatureType: in this case, the singular form is also tried in case the plural one fails. There is still some work to do for transactional support but at least the read-only client part should now be ok. Tests have been added to check that: - TYPENAME form still works with old 2.0.0 - TYPENAMES form works with compliant 2.0.0 - choice geometry types are handled by calling GetFeature and examining the result
- Loading branch information
Showing
9 changed files
with
424 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
ccb4c80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elpaso Did you test this with geoserver instances? See https://issues.qgis.org/issues/18882
ccb4c80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes: I think I did.
ccb4c80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that on the Geoserver instances we are running TYPENAMES doesn't work for the DescribeFeatureType request. Instead it just ignores TYPENAMES and returns schemas for the entire catalogue. Our catalogue is very big.
@rouault Do you have any thoughts about this?
ccb4c80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the commit message "TYPENAME form still works with old 2.0.0". From what I see in http://docs.opengeospatial.org/is/09-025r2/09-025r2.html#142 , TYPENAME is the official parameter name for DescribeFeatureType. So servers requiring TYPENAMES are "buggy" (even if the OGC folks got crazy in changing in GetFeatureType from TYPENAME to TYPENAMES and not doing the same for DescribeFeatureType)
So the logic should be trying first TYPENAME and then TYPENAMES. But as @palmerj underlines a server that ignores a parameter could send the whole catalog. So basically there's no good solution except asking servers to fix their implementation to accept TYPENAME. Or providing a manual switch that knowleadgable users could enable.
ccb4c80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rouault thanks great information.
So we need to revert this change, then possibly implementing a new advanced switch that provides an override for buggy servers.
ccb4c80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elpaso are you able to comment?