[owslib-users] owslib and CSW authentication

Tom Kralidis tomkralidis at hotmail.com
Fri Feb 10 07:53:46 PST 2012




> From: ricardo.garcia.silva at gmail.com
> Date: Fri, 10 Feb 2012 15:50:03 +0000
> To: owslib-users at lists.sourceforge.net
> Subject: [owslib-users] owslib and CSW authentication
> 
> Hello list
> 
> I'm new to owslib and I'm also still finding my way through the CSW
> and XML metadata jungle, so please bear with me.
> I want to use owslib for inserting records to my csw server, but I
> can't seem to insert them unless I am authenticated.
> 
> I've skimmed through the documentation available on [1] and tried to
> insert my data in the csw server with the following commands:
> 
> 
> csw = CatalogueServiceWeb('private server url')
> xmlFile = 'path_to_xml_file'
> csw.transaction(ttype='insert', typename='gmd:MD_Metadata',
> record=open(xmlFile).read())
> print(csw.response)
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
> xsi:schemaLocation="http://www.opengis.net/ows
> http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
>   <ows:Exception exceptionCode="NoApplicableCode">
>     <ows:ExceptionText>Cannot process transaction: User not
> authenticated.</ows:ExceptionText>
>   </ows:Exception>
> </ows:ExceptionReport>
> 
> 
> So, how can I authenticate with the server?
> 
> Thanks in advance
> 
> 
> 
> [1] - http://owslib.sourceforge.net/#csw
> 

FYI there is an open ticket on this issue (https://sourceforge.net/apps/trac/owslib/ticket/7), which I'm hoping to get to in the week or so.

..Tom
 		 	   		  



More information about the Owslib-users mailing list