Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSW returns strange error when inserting the same record twice #16

Open
jirik opened this issue Jun 18, 2020 · 0 comments
Open

CSW returns strange error when inserting the same record twice #16

jirik opened this issue Jun 18, 2020 · 0 comments

Comments

@jirik
Copy link

jirik commented Jun 18, 2020

Tested on versions: 2020.010 and 2020.014

When I first call curl -v -u editor:editor -X POST -d @csw-insert.xml.txt http://localhost:3080/csw, Micka returns expected result

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><csw:TransactionResponse
   xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:gml="http://www.opengis.net/gml"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:ows="http://www.opengis.net/ows"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
   <csw:TransactionSummary>
  		<csw:totalInserted>1</csw:totalInserted>
* Connection #0 to host localhost left intact
   </csw:TransactionSummary><csw:InsertResult><csw:BriefRecord><dc:identifier>m-e05cedc8-d06c-4300-969d-08221875555e</dc:identifier><dc:title>ne_110m_admin_0_countries</dc:title></csw:BriefRecord></csw:InsertResult></csw:TransactionResponse></soap:Body></soap:Envelope>

However, when I call it second time curl -v -u editor:editor -X POST -d @csw-insert.xml.txt http://localhost:3080/csw, Micka returns strange HTTP 500 error:

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">

	<title>Nette Web</title>
</head>

<body>

<h1>appError</h1>
Vstupní data nejsou kompletní.
	<script src="https://nette.github.io/resources/js/netteForms.min.js"></script>
</body>
</html>

Shouldn't it return XML with something like

<ows:ExceptionReport>
   <ows:Exception exceptionCode="TransactionFailed">
      <ows:ExceptionText>Record exists ...</ows:ExceptionText>
   </ows:Exception>
</ows:ExceptionReport>

?
I think it behaved like this in one of previous versions.

BTW the behavior is the same for SOAP.

csw-insert.xml.txt
soap-insert.xml.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant