Esri / geoportal-server-catalog

Esri Geoportal Server is a next generation open-source metadata catalog and editor, based on elasticsearch.
https://www.esri.com/en-us/arcgis/products/geoportal-server/overview
Apache License 2.0
100 stars 63 forks source link

GetRecordById via HTTP POST exception #526

Open dennisdahlmann opened 9 months ago

dennisdahlmann commented 9 months ago

Describe the bug Executing a GetRecordById, including the Id element, request via HTTP POST throws an exception with the text: CSW: The Id parameter is missing.

To Reproduce Steps to reproduce the behavior: Send a HTTP POST request with a valid Id to your CSW instance, e.g. `<GetRecordById service="CSW" version="2.0.2" xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

yourID full

`

Expected behavior If the Id element is in the request and is valid, I expect to get a GetRecordByIdResponse instead of an Exception Report

mhogeweg commented 9 months ago

hi, the key is to use the correct id. As an example, consider this record:

https://[gpt.geocloud.com/geoportal2/rest/metadata/item/81b64034070743aea455078dbf560c0c/html](https://gpt.geocloud.com/geoportal2/rest/metadata/item/81b64034070743aea455078dbf560c0c/html)

its content in the index is this: https://[gpt.geocloud.com/geoportal2/rest/metadata/item/81b64034070743aea455078dbf560c0c?pretty=true](https://gpt.geocloud.com/geoportal2/rest/metadata/item/81b64034070743aea455078dbf560c0c?pretty=true)

its CSW GetRecordById request is: https://[gpt.geocloud.com/geoportal2/csw?request=GetRecordByID&service=CSW&version=2.0.2&id=81b64034070743aea455078dbf560c0c](https://gpt.geocloud.com/geoportal2/csw?request=GetRecordByID&service=CSW&version=2.0.2&id=81b64034070743aea455078dbf560c0c)

hope this helps

dennisdahlmann commented 9 months ago

Hi and thanks for the quick response. The problem here is that the HTTP POST body is not processed, the HTTP GET request you mentioned is working well. We want/have to provide the HTTP POST method, only providing HTTP GET is not working on the client side

mhogeweg commented 7 months ago

We'll add this to our backlog as an enhancement request.