etf-validator / etf-webapp

:earth_africa: :mag: ETF is an open source testing framework for spatial data and services
https://www.etf-validator.net
European Union Public License 1.2
19 stars 19 forks source link

Upload of XML file without XML prolog is not allowed #36

Closed thijsbrentjens closed 8 years ago

thijsbrentjens commented 8 years ago

Description

From a user we got reports that their metadata documents can not be uploaded / used in the validator at: http://validatie.geostandaarden.nl/etf-webapp/testprojects?testdomain=Metadata

An example file is attached. fabd3dfc-1436-4920-933f-924c1c3c1d2f.xml.txt

My analysis: the XML prolog is missing in this document:

<?xml version="1.0" encoding="UTF-8"?>

The XML prolog is optional as far as I know, or am I wrong? In that case, the file should be processed.

(Environment: CentOS, Java 8, Tomcat 8)

Steps to Reproduce

  1. got to http://validatie.geostandaarden.nl/etf-webapp/testprojects?testdomain=Metadata
  2. Choose one of the validators
  3. upload file
  4. start test

Expected behavior: file is processed.

Actual behavior: Error message: De geüploade file kan niet worden gebruikt: text/plainis not supported

thijsbrentjens commented 8 years ago

Note that for uploading to GH I added the file-extension .txt, the orginal file is without this

jonherrmann commented 8 years ago

Yes, the prolog is optional. Will be fixed.

thijsbrentjens commented 8 years ago

Thanks :)

jonherrmann commented 8 years ago

Fixed in etf-webapp 1.0.9

thijsbrentjens commented 8 years ago

today I upgraded our test environment to etf-webapp 1.0.11.2, bsx driver to 1.0.5 and Soapui driver to 1.0.6. I used the artifacts from the repo at interactive instruments.

Uploading an XML file without the prolog is (still?) failing. The test environment is available here:

Steps:

  1. go to http://test.validatie.geostandaarden.nl/etf-webapp/testprojects?testdomain=Metadata
  2. choose one of the test projects in Metadata
  3. upload the file (attached in this issue before)
  4. start test

Environment: Browser: Firefox 47.0 OS Linux (Linux Mint 18, Ubuntu 16.04-based)

jonherrmann commented 8 years ago

Please check and update your build.gradle. The issue has been fixed in the ii-commons-util library 1.2.9.

jonherrmann commented 8 years ago

No issues with the 1.2.9 version from the etf-public-releases and the release repo

thijsbrentjens commented 8 years ago

I deployed the etf-webapp from the etf-public-releases repo. In the WEB-INF/lib dir this jar is deployed: ii-commons-util-1.2.9.jar

I only (manually) added some CSS this time, didn't deploy a custom build.

I restarted Tomcat (several times). So what could be going on?

jonherrmann commented 8 years ago

Mmh good question - I will check again, with a fresh deployment!