[ckan-dev] spatial - csw server error
Adrià Mercader
adria.mercader at okfn.org
Mon Jul 29 15:47:19 UTC 2013
Hi Ryan,
Currently the csw interface offered by CKAN only exposes datasets that
were harvested from other CSW servers or WAFs, for which it has an ISO
representation. So if you create a normal dataset via the form or the
API it won't appear on the CSW endpoint.
Hope this helps,
Adrià
On 19 July 2013 13:48, Ryan Maine <balrogmi at msn.com> wrote:
> I was querying wrongly. I was passing some parameters
> ("elementSetName" and "resultType")
>
> csw?request=GetRecords&service=CSW&resultType=results&elementSetName=full
>
> But now the answer doesn't show any record, it gives 0 records
> returned, but I created several datasets and some of them store info
> into the datastore:
>
> <csw:GetRecordsResponse xmlns:xs2="http://www.w3.org/XML/Schema"
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
> xmlns:gml="http://www.opengis.net/gml"
> xmlns:dif="http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/"xmlns:dc="http://purl.org/dc/elements/1.1/"
> xmlns:gco="http://www.isotc211.org/2005/gco"
> xmlns:gmd="http://www.isotc211.org/2005/gmd"
> xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"
> xmlns:xlink="http://www.w3.org/1999/xlink"xmlns:ows="http://www.opengis.net/ows"
> xmlns:fgdc="http://www.opengis.net/cat/csw/csdgm"
> xmlns:atom="http://www.w3.org/2005/Atom"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:dct="http://purl.org/dc/terms/"
> xmlns:ogc="http://www.opengis.net/ogc">
> <csw:SearchStatus timestamp="2013-07-19T12:39:14.868928"/>
> <csw:SearchResults numberOfRecordsReturned="0" elementSet="full"
> numberOfRecordsMatched="0" nextRecord="0"/>
> </csw:GetRecordsResponse>
>
> Thanks in advance
> Regards
>
> 2013/7/18 Ryan Maine <balrogmi at msn.com>:
>> Hi all,
>>
>> I've just set up spatial extension in CKAN 2.0. It seems that works
>> perfectly, congratulations to the CKAN community. You're doing a great
>> job guys!! But I'm having problems with CSW server.
>>
>> GetCapabilities query works fine
>> csw?request=GetCapabilities&service=CSW
>>
>> GetRecord query returns a "Server Error. An internal server error occurred"
>> csw?request=GetCapabilities&service=CSW
>>
>> The log shows:
>>
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] Error - <type
>> 'exceptions.KeyError'>: 'elementSetName'
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] URL:
>> http://127.0.0.1.eu-west-1.compute.amazonaws.com/csw?request=GetRecords&service=CSW
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/weberror/errormiddleware.py',
>> line 162 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] app_iter =
>> self.application(environ, sr_checker)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line
>> 147 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] resp =
>> self.call_func(req, *args, **self.kwargs)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line
>> 208 in call_func
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] return
>> self.func(req, *args, **kwargs)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/fanstatic/publisher.py',
>> line 234 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] return
>> request.get_response(self.app)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py',
>> line 1053 in get_response
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] application,
>> catch_exc_info=False)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py',
>> line 1022 in call_application
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] app_iter =
>> application(self.environ, start_response)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line
>> 147 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] resp =
>> self.call_func(req, *args, **self.kwargs)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/dec.py', line
>> 208 in call_func
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] return
>> self.func(req, *args, **kwargs)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/fanstatic/injector.py',
>> line 54 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] response =
>> request.get_response(self.app)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py',
>> line 1053 in get_response
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] application,
>> catch_exc_info=False)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/webob/request.py',
>> line 1022 in call_application
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] app_iter =
>> application(self.environ, start_response)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/beaker/middleware.py',
>> line 73 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] return
>> self.app(environ, start_response)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/beaker/middleware.py',
>> line 155 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] return
>> self.wrap_app(environ, session_start_response)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/routes/middleware.py',
>> line 131 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] response =
>> self.app(environ, start_response)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/wsgiapp.py',
>> line 125 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] response =
>> self.dispatch(controller, environ, start_response)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/wsgiapp.py',
>> line 324 in dispatch
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] return
>> controller(environ, start_response)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 289 in
>> __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] res =
>> WSGIController.__call__(self, environ, start_response)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py',
>> line 221 in __call__
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] response =
>> self._dispatch_call()
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py',
>> line 172 in _dispatch_call
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] response =
>> self._inspect_call(func)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py',
>> line 107 in _inspect_call
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] result =
>> self._perform_call(func, args)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/controllers/core.py',
>> line 60 in _perform_call
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] return func(**args)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/controllers/csw.py',
>> line 92 in dispatch_get
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] return
>> ops[req["request"]](req)
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] File
>> '/usr/lib/ckan/default/src/ckanext-spatial/ckanext/spatial/controllers/csw.py',
>> line 381 in GetRecords
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] "elementSet":
>> req["elementSetName"], # we lie here. it's always really "full"
>> [Thu Jul 18 15:46:20 2013] [error] [client 127.0.0.1] KeyError: 'elementSetName'
>>
>> What's "elementSetName"?
>>
>> Thanks in advance
>> Regards
>
> _______________________________________________
> 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