Open landryb opened 2 years ago
here's the HTML sent back by GET /geoserver/rest/workspaces/geopub/datastores/ortho_cantal_2020/featuretypes/ortho_cantal_2020
(with a 200 code):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r\n
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r\n
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r\n
<head>\r\n
<title>GeoServer Configuration</title>\r\n
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/>\r\n
</head>\r\n
<body>\r\n
\r\n
Feature Type "ortho_cantal_2020"\n
\n
<ul>\n
<li>Name: ortho_cantal_2020</li>\n
<li>Description: null</li>\n
<li>Abstract: null</li>\n
<li>Enabled: false</li>\n
<li>SRS: null</li>\n
<li>Bounds: ReferencedEnvelope[625000.0 : 730000.0, 6390000.0 : 6488000.0]></li> \n
</ul>\n
\n
</body>\r\n
</html>\n
here's the XML sent that triggers the error when being PUT on /geoserver/rest/workspaces/geopub/datastores/ortho_cantal_2020/featuretypes/ortho_cantal_2020
<featureType>
<title>
Test geopublication
</title>
<abstract>
Mon résumé a moi
</abstract>
<enabled>
true
</enabled>
<metadataLinks>
<metadataLink>
<type>
text/xml
</type>
<metadataType>
ISO19115:2003
</metadataType>
<content>
https://FQDN/geonetwork/srv/fre//csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&outputSchema=http://www.isotc211.org/2005/gmd&ID=e731c037-8698-4b3d-b757-b4c11855b6df
</content>
</metadataLink>
<metadataLink>
<type>
text/xml
</type>
<metadataType>
TC211
</metadataType>
<content>
https://FQDN/geonetwork/srv/fre//csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&outputSchema=http://www.isotc211.org/2005/gmd&ID=e731c037-8698-4b3d-b757-b4c11855b6df
</content>
</metadataLink>
<metadataLink>
<type>
text/html
</type>
<metadataType>
TC211
</metadataType>
<content>
https://FQDN/geonetwork/srv/api/records/e731c037-8698-4b3d-b757-b4c11855b6df
</content>
</metadataLink>
</metadataLinks>
</featureType>
Well, it was a 'doh' moment, but geopublication works with a zip that contains a layer with a valid projection, and fails with a layer which has no valid projection. Still an issue to gracefully handle i guess..
maybe checking for <li>SRS: null</li>\n
in the reply received in https://github.com/geonetwork/core-geonetwork/blob/main/services/src/main/java/org/fao/geonet/api/mapservers/GeoServerRest.java#L565 ?
Describe the bug trying to publish a layer to geoserver 2.18 fails
To Reproduce Steps to reproduce the behavior:
Expected behavior The layer should be published in geoserver
Log file
Sequence of events/calls between GN and GS:
geoserver log for rest.catalog:
traceback of failing call in geoserver log:
in geoserver, the layer is listed in the list but not active and not fully configured. I'll dig into that, trying to figure out what is missing...