[ckan-dev] CKAN CSW Server support: 'outputSchema' issues

Ryan Hodges rhodges at ecotrust.org
Mon Nov 12 23:43:52 UTC 2012


Hi all,

I have been attempting to run some basic CSW requests against a test install of CKAN 1.8 that we've been testing CSW harvesting with (Ckanext-harvest + Ckanext-spatial, all installed from source).

It was recommended in a prior thread that I test out the version of OWSLIB, which in the past was a OKFN specific fork but is now pointed here: https://github.com/geopython/OWSLib

Running with this (v0.5.1), I ran the usage examples in the README, except with CSW instead of WMS on my own install:

>>> from owslib.csw import CatalogueServiceWeb
>>> csw = CatalogueServiceWeb('http://ckan.labs.ecotrust.org/csw', version='2.0.2')
>>> csw.getrecords()
>>> csw.response

Normally that last command would give XML of the records retrieved, but in this case you get this error:
------------------------------------------------------------------------
<ows:ExceptionReport xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" xmlns:xs2="http://www.w3.org/XML/Schema" xmlns:gml="http://www.opengis.net/gml" xmlns:dif="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:ogc="http://www.opengis.net/ogc" xmlns:fgdc="http://www.opengis.net/cat/csw/csdgm" xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd" version="1.0.0">
    <ows:Exception locator="outputSchema" exceptionCode="InvalidParameterValue">
        <ows:ExceptionText>http://www.opengis.net/cat/csw/2.0.2</ows:ExceptionText>
    </ows:Exception>
</ows:ExceptionReport>
------------------------------------------------------------------------

I suspected my install, but it sounds like it's a CKAN issue. From the IRC discussion:

tomkralidis<irc://freenode/tomkralidis,isnick> -
CKAN is not serving CSW properly. The CSW server is having issues with the outputschema. When I pass outputschema='http://www.isotc211.org/2005/gmd' in getrecords(), then I get a 500.
tomkralidis<irc://freenode/tomkralidis,isnick> -
the default getrecords() passes typenames='csw:Record', which the CKAN CSW currently doesn't support. But it doesn't fail on that (but it should). It fails on outputschema. When you try to pass the correct outputschema, the 500 above happens

Is there a ticket for this, or something on my end I need to fix?

Thanks,
Ryan Hodges | Applications Developer | Ecotrust
721 NW 9th Avenue, Suite 200 * Portland, OR 97209
T (503) 467.0800 | F (503) 222.1517 | www.ecotrust.org<http://www.ecotrust.org/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20121112/37424e6b/attachment.html>


More information about the ckan-dev mailing list