Open lgoltz opened 5 years ago
@lgoltz
I am able to reproduce this issue on local environment if you can see the session/error_log/log.xml the XMLValidatingParser is failed to parse request resource.
The Test wcs:GetCoverage_RangeSubset_Repeated_Identifier
is failed with the following error:
Failed to parse resource from https://onestop.cubewerx.com/cubewerx/cubeserv/cite_wcs?DATASTORE=Foundation&service=WCS&request=GetCoverage&version=1.1.1&identifier=etopo2&BoundingBox=-89.98333333333333,-179.9833333333333,89.98333333333333,179.9833333333333,urn:ogc:def:crs:EPSG::4326&RangeSubset=GEOMETRY,GEOMETRY&Format=image/tiff
Failed to parse input: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream
at com.occamlab.te.parsers.XMLValidatingParser.parse(XMLValidatingParser.java:227)
In similar way following tests were failed:
All above tests are expecting the owcExceptionReport but get the different response.
I think the issue is with the service not with ets so service should be fixed.
Here is the error log: log.txt
@lgoltz Errors are expected. Do you see any improvements which can be done to improve logging? Otherwise, this issue can be closed.
The response is a multipart response with XML and an Image, expected is an ExceptionReport @keshav-nangare Can you check if the XMLValidatingParser can be replaced with an HTTPParser?
E.g.
<ctlp:HTTPParser>
<ctlp:parse mime="text/xml">
<ctlp:XMLValidatingParser ignoreErrors="false" ignoreWarnings="false">
<ctlp:schemas>
<ctlp:schema type="resource">xsd/ogc/ows/1.1.0/owsExceptionReport.xsd</ctlp:schema>
</ctlp:schemas>
</ctlp:XMLValidatingParser>
</ctlp:parse>
</ctlp:HTTPParser>
@lgoltz
<ctlp:HTTPParser>
<ctlp:parse mime="text/xml">
<ctlp:XMLValidatingParser ignoreErrors="false" ignoreWarnings="false">
<ctlp:schemas>
<ctlp:schema type="resource">xsd/ogc/ows/1.1.0/owsExceptionReport.xsd</ctlp:schema>
</ctlp:schemas>
</ctlp:XMLValidatingParser>
</ctlp:parse>
</ctlp:HTTPParser>
I have updated the parser configuration to above in request and tested with the same service but still getting failed with the same error.
I have configured the parser with the below configuration then the test gets passed. I saw the response but it doesn't have exception report still the test getting passed.
<ctlp:HTTPParser>
<ctlp:parse mime="text/xml"/>
<ctlp:parse>
<ctlp:NullParser/>
</ctlp:parse>
</ctlp:HTTPParser>
Test Request: wcs:GetCoverage_RangeSubset_Repeated_Identifier
https://onestop.cubewerx.com/cubewerx/cubeserv/cite_wcs?DATASTORE=Foundation&service=WCS&request=GetCoverage&version=1.1.1&identifier=etopo2&BoundingBox=-89.98333333333333,-179.9833333333333,89.98333333333333,179.9833333333333,urn:ogc:def:crs:EPSG::4326&RangeSubset=GEOMETRY%2CGEOMETRY&Format=image/tiff
Response: Download
@keshav-nangare
The service endpoint appears to have changed slightly to https://onestop.cubewerx.com/cubewerx/cubeserv/?DATASTORE=Foundation&service=WCS&request=GetCoverage&version=1.1.1&identifier=etopo2&BoundingBox=-89.98333333333333,-179.9833333333333,89.98333333333333,179.9833333333333,urn:ogc:def:crs:EPSG::4326&RangeSubset=GEOMETRY%2CGEOMETRY&Format=image/tiff
Discussion between @keshav-nangare and @ghobona on 2020-07-15.
@keshav-nangare will check whether an if-else condition can be used to check whether the MIME type of the response is xml or a multipart.
The following tests are fixed with the PR #63 :
@keshav-nangare When testing with https://demo.cubewerx.com/cubewerx/cubeserv/cite_wcs111?DATASTORE=Foundation&SERVICE=WCS&REQUEST=GetCapabilities&VERSION=1.1.1 all 4 modified tests are failing. However, those tests were passed before (you can revert the two commits of the feature branch). Can you please check why the test result changed? You can also use following service for testing: https://demo.cubewerx.com/cubewerx/cubeserv/cite_wcs111?DATASTORE=Foundation&SERVICE=WCS&REQUEST=GetCapabilities&VERSION=1.1.1
@dstenger
I have fixed the tests which were getting failed. Now some of the next tests are getting failed because the request's response is multipart and test using XMLValidatingParser as it's not supporting that response type. Should I update all the tests which are failing with above reason?
@dstenger
I have updated the remaining tests having parser problems and tested changes on my machine successfully. Please find the changes in the same PR.
Still, additional tests are failing when the pull request is tested with https://demo.cubewerx.com/cubewerx/cubeserv/cite_wcs111?DATASTORE=Foundation&SERVICE=WCS&REQUEST=GetCapabilities&VERSION=1.1.1. The result of the test suite should not be changed by the pull request.
Tested with https://onestop.cubewerx.com/cubewerx/cubeserv/cite_wcs?DATASTORE=Foundation&service=WCS&request=GetCapabilities&VERSION=1.1.1 on a local docker environment (TEAM Engine 5.3, 1.13-SNAPSHOT).
Several errors are reported in the tomcat log: