[GeoNetwork-devel] [GeoNetwork opensource Developer website] #603: WMS 1.3.0 MetadataURL xlinks not being followed when harvesting

#603: WMS 1.3.0 MetadataURL xlinks not being followed when harvesting
-----------------------------------------------------------------+----------
Reporter: rmcaleer | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: Future release
Component: General | Version: v2.6.4
Keywords: WMS 1.3.0, Harvesting, Metadata, MetadataURL, xlink |
-----------------------------------------------------------------+----------
Steps to reproduce:
* Go to 'Administration->Harvesting Management' in Geonetwork
* Add an OGC Web Service
** Select WMS 1.3.0 as the type
** Select 'Create metadata for layer elements using MetadataURL attributes
(if existing, if not use GetCapabilities).' for the 'Type of Import'
* Go back to the Harvesting Management page, select the added WMS 1.3.0
and 'Run' it to start harvesting.

There's no easy way to tell if it follows the MetadataURL links. I set up
a remote debug session to my Geonetwork install from eclipse and put a
breakpoint in the org.fao.geonet.kernel.harvest.harvester.ogcwxs.Harvester
class on line 511 in the addLayerMetadata method. This line has the
following call:

XPath mdUrl = XPath.newInstance ("./MetadataURL[@type='TC211' and
Format='text/xml']/OnlineResource");

The issue is the @type='TC211'. According to the WMS 1.3.0 spec for the
MetadataURL element:

"Two 'type' attribute values are defined by this International Standard:
the value 'ISO19115:2003' refers to ISO 19115:2003; the value 'FGDC:1998'
refers to FGDC-STD-001-1998 [1]."

So TC211 isn't a valid value for the type attribute of MetadataURL in WMS
1.3.0 and the XPath expression above returns null for valid MetadataURLs
from a WMS 1.3.0.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/603&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#603: WMS 1.3.0 MetadataURL xlinks not being followed when harvesting
-----------------------------------------------------------------+----------
Reporter: rmcaleer | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: Future release
Component: General | Version: v2.6.4
Keywords: WMS 1.3.0, Harvesting, Metadata, MetadataURL, xlink |
-----------------------------------------------------------------+----------

Comment(by josegar74):

Hi

If you can provide a link to a WMS 1.3.0 server using !MetadataUrl with
the value 'ISO19115:2003', I can test and commit a fix.

I found some WMS 1.3.0 servers with !MetadataUrl, but continue using
'TC211' value.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/603#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#603: WMS 1.3.0 MetadataURL xlinks not being followed when harvesting
-----------------------------------------------------------------+----------
Reporter: rmcaleer | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: minor | Milestone: Future release
Component: General | Version: v2.6.4
Keywords: WMS 1.3.0, Harvesting, Metadata, MetadataURL, xlink |
-----------------------------------------------------------------+----------

Comment(by rmcaleer):

Sorry for taking so long to reply, here's a link to a WMS that should work
for testing with:

http://server.caris.com/spatialfusionserver/services/ows/wms/world?request=getcapabilities&service=WMS&version=1.3.0

Would've posted sooner, but when I filed the original DI it was running on
an older version of our server that was using TC211 in the 1.3.0 cap
files, but the latest version is updated to use ISO19115:2003.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/603#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#603: WMS 1.3.0 MetadataURL xlinks not being followed when harvesting
-----------------------+----------------------------------------------------
  Reporter: rmcaleer | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: minor | Milestone: Future release
Component: General | Version: v2.6.4
Resolution: fixed | Keywords: WMS 1.3.0, Harvesting, Metadata, MetadataURL, xlink
-----------------------+----------------------------------------------------
Changes (by josegar74):

  * status: new => closed
  * resolution: => fixed

Comment:

Committed in rev

With the server provided
(http://server.caris.com/spatialfusionserver/services/ows/wms/world?request=getcapabilities&service=WMS&version=1.3.0)
the layers metadata is loaded by harvester, but fail the insertion in
database due to http://trac.osgeo.org/geonetwork/ticket/809

Tested with other WMS 1.3.0 server with metadataUrl and the metadata is
harvested properly.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/603#comment:3&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#603: WMS 1.3.0 MetadataURL xlinks not being followed when harvesting
-----------------------+----------------------------------------------------
  Reporter: rmcaleer | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: minor | Milestone: v2.6.5
Component: General | Version: v2.6.4
Resolution: fixed | Keywords: WMS 1.3.0, Harvesting, Metadata, MetadataURL, xlink
-----------------------+----------------------------------------------------
Changes (by ianwallen):

  * milestone: Future release => v2.6.5

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/603#comment:4&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.