[owslib-users] owslib and CSW authentication
Ricardo Filipe Soares Garcia da
ricardo.garcia.silva at gmail.com
Fri Feb 10 07:50:03 PST 2012
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
--
___________________________ ___ __
Ricardo Garcia Silva
More information about the Owslib-users
mailing list