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

Data Test run configuration: using a remote file is not working correctly #129

Closed jonherrmann closed 7 years ago

jonherrmann commented 7 years ago

Test using: http://mapy.geoportal.gov.pl/wss/service/CSWINSP/guest/CSWStartup?SERVICE=CSW&REQUEST=GetRecordById&VERSION=2.0.2&ID=76804362-f64e-11e5-9ce9-5e5517507c66&OUTPUTFORMAT=application/xml&OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&ELEMENTSETNAME=full

Error message: The uploaded file with type application/octet-stream is not supported and cannot be used

Curl says: Content-Type: text/xml;charset=UTF-8

jonherrmann commented 7 years ago

Todo:

klimeto commented 7 years ago

I'm having the same problem. While trying to use OGC CSW GetRecordById response as a Remote file (URL) option, the app errors in Test Run Initialization failure, not being able to determine the test object type. While trying the same metadata record with an URL generating an XML, the process results in error Test Run initialization failure: No files were found with a gml or xml file extension. Only when the URL string contains ".xml", or ".gml" strings the test runs successfully.

jonherrmann commented 7 years ago

@klimeto I am not sure if your issue is part of this error class, as the error messages are different. Note that there is an issue with GetRecordById responses in the current deployment: https://github.com/inspire-eu-validation/ets-repository/issues/96

Please post the complete URL of your service here or mail it to

jonherrmann commented 7 years ago

The issue only occurs if the host header is not set:

JAX:v2.0 herrmann$ curl -v 'http://mapy.geoportal.gov.pl/wss/service/CSWINSP/guest/CSWStartup?SERVICE=CSW&REQUEST=GetRecordById&VERSION=2.0.2&ID=76804362-f64e-11e5-9ce9-5e5517507c66&OUTPUTFORMAT=application/xml&OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&ELEMENTSETNAME=full' -H 'Host:'
*   Trying 91.223.135.44...
* TCP_NODELAY set
* Connected to mapy.geoportal.gov.pl (91.223.135.44) port 80 (#0)
> GET /wss/service/CSWINSP/guest/CSWStartup?SERVICE=CSW&REQUEST=GetRecordById&VERSION=2.0.2&ID=76804362-f64e-11e5-9ce9-5e5517507c66&OUTPUTFORMAT=application/xml&OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&ELEMENTSETNAME=full HTTP/1.1
> User-Agent: curl/7.54.0
> Accept: */*
> 
* Recv failure: Connection reset by peer
* stopped the pause stream!
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
jonherrmann commented 7 years ago

and when the user agent contains the string Java:

curl -v 'http://mapy.geoportal.gov.pl/wss/service/CSWINSP/guest/CSWStN=2.0.2&ID=76804362-f64e-11e5-9ce9-5e5517507c66&OUTPUTFORMAT=application/xml&OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&ELEMENTSETNAME=full' -H 'User-Agent:Java' -H 'Host:mapy.geoportal.gov.pl'