Geomatys / constellation

WARNING: Constellation-SDI Product and repository is now DEPRECATED, please use Examind Community instead.
https://github.com/Geomatys/examind-community
Other
16 stars 8 forks source link

CSW harvesting error with Geoportal Server #1

Closed acheype closed 10 years ago

acheype commented 10 years ago

After a GetCapabilities, Geoportal send some GetRecords POST requests to harvest a CSW catalog. However, your CSW webservice doesn't recognize the "typeNames" value of the request.

a POST request example :

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" outputSchema="http://www.isotc211.org/2005/gmd" version="2.0.2" service="CSW" resultType="results" startPosition="1" maxRecords="20">
    <csw:Query typeNames="gmd:MD_Metadata" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
        <csw:ElementSetName>full</csw:ElementSetName>
        <csw:Constraint version="1.1.0"><ogc:Filter xmlns="http://www.opengis.net/ogc"/></csw:Constraint>
    </csw:Query>
</csw:GetRecords>

the server answer :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" xmlns:ns2="http://www.opengis.net/ows/1.1" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
    <ows:Exception exceptionCode="InvalidParameterValue" locator="TypeNames">
        <ows:ExceptionText>The service was unable to read a typeName:
supported one are:
MD_Metadata
Record
        </ows:ExceptionText>
    </ows:Exception>
</ows:ExceptionReport>

This request works correctly with other catalogs based on Geoportal or GeoNetwork apps.

I initially made these tests with the 0.9-AMMA-CATCH-2.0-SNAPSHOT constellation version. But I've also tried with other Geomatys projects and I still have the same issue. There are the webservices I tried (I can't know the version) : http://www.ose-guyamapa.org/guyamapa-cstl/WS/csw/guyamapa http://reflecs.cnes.fr/WS/csw/default http://demo.mdweb-project.org/mdweb/WS/csw/default http://geonetcab.mdweb-project.org/WS/cswiso/default

glegal commented 10 years ago

hi. Your request is wrong, you use the typename "gmd:MD_metadata" but the prefix gmd is not bound to a namespace declaration. You must add xmlns:gmd="http://www.isotc211.org/2005/gmd" to the root mark. I agree that the error message is not very helpfull, i'll try to improve it. Other implementation are more permissive about invalid request than constellation.

acheype commented 10 years ago

Thank you for your answer Guilhem. Unfortunately this is not "my" request, this is the default Geoportal's one. Cf the XSLT used to make the request : https://github.com/Esri/geoportal-server/blob/master/geoportal/src/gpt/search/profiles/CSW_2.0.2_APISO_GeoNetwork_GetRecords_Request.xslt

To try, I've added the xmlgs:gmd property and yes, it's better. However, the AMMA-CATCH server still return an error : java.lang.UnsupportedOperationException: Not supported yet. With the other servers I listed behind, the request works only with the Guyamapa's one. I can guess it hasn't been developed on the older versions but it's now OK with new ones (as we can see with the project Guyamapa), isn't it ?