Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#603 closed defect (fixed)

WMS 1.3.0 MetadataURL xlinks not being followed when harvesting

Reported by: rmcaleer Owned by: geonetwork-devel@…
Priority: minor Milestone: v2.6.5
Component: General Version: v2.6.4
Keywords: WMS 1.3.0, Harvesting, Metadata, MetadataURL, xlink Cc:

Description

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.

Change History (4)

comment:1 by josegar74, 13 years ago

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.

comment:2 by rmcaleer, 12 years ago

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.

comment:3 by josegar74, 12 years ago

Resolution: fixed
Status: newclosed

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.

comment:4 by ianwallen, 12 years ago

Milestone: Future releasev2.6.5
Note: See TracTickets for help on using tickets.