Bug: In ArcGIS Online, directed search results in Geoportal do not display metadata
When clicking the link to view metadata for a record retrieved from an ArcGIS Online directed search in the Geoportal, the following error message is returned:
"Could not get metadata record object uuid=.... : Server returned HTTP response code: 403 for URL: http://www.arcgisonline.com/sharing/search?/content/items/.../info/iteminfo.xml Could not perform operation."
This is a known issue.
The gpt.xml URL for the ArcGIS Online repository must be altered, and a line needs to be added to the ArcGIS Online GetRecords response in the Geoportal's internal ArcGIS Online default transformation files.
To address this, the Geoportal's system administrator can modify two settings in the Geoportal so users do not get an error when viewing metadata from ArcGIS Online discovered through the Directed Search.
- Open the gpt.xml file in a text editor. This file can be found in the <TOMCAT>\webapps\geoportal\WEB-INF\classes\gpt\config folder.
- In the <search> element, find the element for defining the ArcGIS Online repository. This will be the <repository> where key="ArcGISOnline".
- Change that element's parameter key="url" value from "http://www.arcgisonline.com/sharing/search?f=json&t=content" to "http://www.arcgisonline.com/sharing".
- Save the gpt.xml file.
- Navigate to the <TOMCAT>\webapps\geoportal\WEB-INF\lib folder and open the gpt.jar archive. It may be necessary to uncompress this file in order to see into the archive.
- Once the gpt.jar has been opened, navigate to the \com\esri\gpt\catalog\agsonline\ folder.
- Open the ArcgisOnline_GetRecords_Request.xslt file in a text editor.
- Directly under the <xsl:template match="/"> element and directly above the <xsl:variable name="keyword" select="normalize-space(/GetRecords/KeyWord)"/> element, add the following element:
- Save the ArcgisOnline_GetRecords_Request.xslt file, and re-compress the gpt.jar archive.
- Restart Tomcat for the changes to take effect.