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

David Read david.read at hackneyworkshop.com
Tue Nov 13 09:27:37 UTC 2012


Ryan,

My suggestion to try OWSLib was with the third-party servers you are
harvesting on.

As the documentation says, the CWS server that CKAN provides itself is
very basic and doesn't cope with many variants of CSW. In recent tests
I found that such simple things fox it, such as putting parameter
names in capital letters and some parameters are defaulted on a POSTs
but not on a GET. My understanding is that it was designed only for a
Geonetworks server to harvest from it, since that was what the paying
client asked for.

I don't think it would take too much work to get it to work a lot
smoother, and that would be great if you were able to contribute this.

Tom Kralidis has been talking for a while about integrating PyCSW code
in. That is a reasonably large task since the CKAN model would have to
have a good mapping of the ISO fields. To get it started though, it
might be worth copying the PyCSW server code and getting it to server
CKAN's HarvestedObjects which contain the ISO XML.

So, I'm afraid it's not all on a plate for you ready to go to do what
you want... but it's a good start. I guess this is a relatively small
area of open source and the more people that contribute, the stronger
it will be for the next organisation.

David

On 12 November 2012 23:43, Ryan Hodges <rhodges at ecotrust.org> wrote:
> 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 –
>
> 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 –
>
> 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
>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>




More information about the ckan-dev mailing list