etf-webapp icon indicating copy to clipboard operation
etf-webapp copied to clipboard

"DOCTYPE disallowed" on ETF release candidate WMS INSPIRE ETS execution

Open carlospzurita opened this issue 3 years ago • 5 comments

Description

During the testing of the new release candidate of the ETF, an error has been encountered during the execution of the the INSPIRE WMS Executable Test Suite. This error happens on GetCapabiltiesOperation > at.05 > no request parameter , as shown on the attached TestReport.

The logs for the TestRuns displays this information

ERROR DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.

The message does not appear on the production instance of the INSPIRE Reference validator. The mentioned requirement is correctly marked as passed for this WMS endpoint.

Operating systems and browser

  • The issue has been encountered deploying the Release candidate on a container using Docker 20.10.3, over Ubuntu 20.10.3 LTS
  • This issue has also been detected on the central deployment of the RC on https://tc-2-1.etf.interactive-instruments.de/etf-webapp/

Steps to Reproduce

  1. Load INSPIRE ETS on ETF
  2. Create a Test Run using the WMS ETS
  3. Use https://services.bgr.de/wms/inspire_nz/gerseis/?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0 as the service endpoint
  4. Check result on GetCapabiltiesOperation > at.05 > no request parameter
  5. Check log for test run

Expected behavior:

Test should marked as passed Actual behavior: Test fails due to unexpected error on XML parsing. Error on DOCTYPE declaration appears on log file.

Causes and alternatives

The main suspect to be the source of this issue is the default configuration for the XMLSlurper library that is used on Groovy to parse the contents of the GetCapabilities XML. We have tried to override this check using the solution provided on this post, without success

parser=new XmlSlurper()
parser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false) 
parser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
parser.parse(it)

carlospzurita avatar Mar 16 '21 18:03 carlospzurita