forked from geonetwork/core-geonetwork
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harvesting / WFS feature / Add WFS2 support for MapServer
Mapserver may return by default GetCapabilities in version 2.0.0. Depending on the URL set in metadata records, WFS harvesting may fails with: ``` 2023-10-27T10:54:42,350 ERROR [geonetwork.harvest.wfs.features] - Failed to connect to server 'http://geoservices.brgm.fr/geologie?language=fre&'. Error is class net.opengis.wfs20.impl.WFSCapabilitiesTypeImpl cannot be cast to class net.opengis.wfs.WFSCapabilitiesType (net.opengis.wfs20.impl.WFSCapabilitiesTypeImpl and net.opengis.wfs.WFSCapabilitiesType are in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @cda6100) ``` because of the `MapServerWFSStrategy` extending WFS1 strategy. Use `StrictWFS_2_0_Strategy` if harvesting is done using 2.0.0 on MapServer. Can be tested with ``` curl 'http://localhost:8080/geonetwork/srv/api/workers/data/wfs/actions/start' \ -X 'PUT' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: eng' \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Cookie: JSESSIONID=node0hjdye0js612o1qex2n36lekt81.node0; serverTime=1698396822574; sessionExpiry=1698398922574; XSRF-TOKEN=c353b2ca-a77c-4552-839c-37405771c4e2;' \ -H 'X-XSRF-TOKEN: c353b2ca-a77c-4552-839c-37405771c4e2' \ --data-raw '{"url":"http://geoservices.brgm.fr/geologie?language=fre&","strategy":"investigator","typeName":"GITES_EMP","version":"2.0.0"}' \ --compressed ```
- Loading branch information
1 parent
016399b
commit 81efcfc
Showing
4 changed files
with
14 additions
and
14 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