Hi,
I found out that having the ogcapi features plugin in the classpath was
altering the behaviour of WFS services: the WFS GetCapabilities advises an
outputFormat which actually is not available for GetFeatures operations
("application/geo+json"). I opened an issue on osgeo's JIRA in this
regard[1], but I also had some time to dig further, and I am perplexed as
how I could fix it myself.
It seems that the RFCGeoJSONGeaturesResponse implements the
canHandle(Version) method from a parent class which always return true,
making it appearing into the WFS GetCapabilities. My guess was to return
false when WFS is involved and true otherwise, implementing the canHandle()
on the class the following way:
@Override public boolean canHandle(Version version) { // Do not interfere
with WFS if (version.equals(WFSInfo.Version.V_10.getVersion()) ||
version.equals(WFSInfo.Version.V_11.getVersion()) ||
version.equals(WFSInfo.Version.V_20.getVersion())) return false; return
true; }
But it sounds quite fragile as a fix (what if a new version of OGCAPI
arises which would clash with WFS versions) ? I am not even sure if the RFC
GeoJSON class could not be actually used for WFS operations (yet it comes
with the ogcapi plugin), or if it should not be mentioned in the WFS
operations at all.
What do you think ?
Best regards,
[1] https://osgeo-org.atlassian.net/browse/GEOS-11926
--
Pierre Mauduit
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel