Hello Guys,
I am working on Geonetwork to fetch the response based on the ID from 2
different Geonetwork instances installed at different locations,
Though the input XML is same to fetch (ignore the UUID) with the below tag
to get full details
<csw:ElementSetName>full</csw:ElementSetName>
the output is different with <grg> tags, could somebody help me on what
configurations changes are required to make the output (response XML) same.
Please find attached the request and response XML's for both the
Geonetworks.
XML snippet:
Server ONE:
<!-- Request XML -->
<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordById xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
service="CSW" version="2.0.2"
resultType="results" outputSchema="http://www.isotc211.org/2005/gmd">
<csw:Id>17d91f39-1df1-4194-9141-953cc8cf5da4</csw:Id>
<csw:ElementSetName>full</csw:ElementSetName>
</csw:GetRecordById>
<!-- Response XML -->
<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordByIdResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2">
<grg:RE_Register xmlns:grg="http://www.isotc211.org/2005/grg" xmlns:gmd="
http://www.isotc211.org/2005/gmd" xmlns:gco="
http://www.isotc211.org/2005/gco" xmlns:gnreg="
http://geonetwork-opensource.org/register" xmlns:xlink="
http://www.w3.org/1999/xlink" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:geonet="
http://www.fao.org/geonetwork" uuid="17d91f39-1df1-4194-9141-953cc8cf5da4"
xsi:schemaLocation="http://www.isotc211.org/2005/grg
http://www.isotc211.org/2005/grg/grg.xsd http://www.isotc211.org/2005/gmd
http://www.isotc211.org/2005/gmd/gmd.xsd http://www.isotc211.org/2005/gco
http://www.isotc211.org/2005/gco/gco.xsd">
<grg:name>
<gco:CharacterString>ANDS RIFCS XSLT Register</gco:CharacterString>
</grg:name>
<grg:contentSummary>
<gco:CharacterString>A Register of XSLTs used to convert metadata in
different schemas to the Registry Interchange Format - Collections and
Services (RIF-CS) Schema used by the Australian National Data Service
(ANDS).</gco:CharacterString>
</grg:contentSummary>
<grg:uniformResourceIdentifier>
<gmd:CI_OnlineResource>
<gmd:linkage>
<!-- This should be a reference to the location of this register
record preferably in a catalog such as GeoNetwork that
supports viewing an ISO19135 record -->
<gmd:URL>http://ands.org.au/rifcs/converters.xml</gmd:URL>
</gmd:linkage>
</gmd:CI_OnlineResource>
</grg:uniformResourceIdentifier>
<grg:operatingLanguage>
<grg:RE_Locale id="operating_lang">
<grg:name>
.
.
.
.
Server TWO:
<!-- Request XML on local GEONETWORK -->
<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordById xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
service="CSW" version="2.0.2"
resultType="results" outputSchema="http://www.isotc211.org/2005/gmd">
<csw:Id>591e3727-c243-4aae-8c3f-113840519357</csw:Id>
<csw:ElementSetName>full</csw:ElementSetName>
</csw:GetRecordById>
<!-- Response XML on local GEONETWORK -->
<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecordByIdResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2">
<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="
http://www.isotc211.org/2005/gco" xmlns:gts="
http://www.isotc211.org/2005/gts" xmlns:gsr="
http://www.isotc211.org/2005/gsr" xmlns:gss="
http://www.isotc211.org/2005/gss" xmlns:gmx="
http://www.isotc211.org/2005/gmx" xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:geonet="
http://www.fao.org/geonetwork" xsi:schemaLocation="
http://www.isotc211.org/2005/gmd/gmd.xsd
http://www.opengis.net/gml/gml.xsd
http://www.w3.org/1999/xlink/xlinks.xsd">
<gmd:fileIdentifier>
<gco:CharacterString>591e3727-c243-4aae-8c3f-113840519357</gco:CharacterString>
</gmd:fileIdentifier>
<gmd:language>
<gco:CharacterString>eng</gco:CharacterString>
</gmd:language>
<gmd:hierarchyLevel>
<gmd:MD_ScopeCode codeList="
http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode"
codeListValue="collectionSession" />
</gmd:hierarchyLevel>
<gmd:hierarchyLevelName>
<gco:CharacterString>collectionSession</gco:CharacterString>
</gmd:hierarchyLevelName>
.
.
.
.
.
It would be really helpful to know if there is any CSW client to parse the
different responses like these, so that the codes does not break.
Currently using
Geotoolkit.org (CSW client)
getting ParseException.
Maven dependency:
<dependency>
<groupId>org.geotoolkit.pending</groupId>
<artifactId>geotk-client-csw</artifactId>
<version>3.20</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Maven Repository:
<repository>
<!-- Not needed for "*-geoapi-3.0" versions -->
<id>geotoolkit</id>
<name>Geotk repository</name>
<url>http://maven.geotoolkit.org/</url>
</repository>
Thanks in advance.
--
Thanks
Manjunath
(attachments)
Geonetwork-Server-ONE.xml (29.9 KB)
Geonetwork-Server-TWO.xml (6.03 KB)