opengeospatial / ets-wfs11

Executable Test Suite for WFS 1.1
Other
1 stars 5 forks source link

wfs-1.1.0-Basic-GetFeature-tc5 test failing #85

Closed swen100 closed 6 years ago

swen100 commented 6 years ago

Hello,

I have a problem with the WFS 1.1 basic test suite. All tests pass except this one: "wfs:wfs-1.1.0-Basic-GetFeature-tc5" (http://cite.opengeospatial.org/teamengine/listings/srv_local_teamengine-prod_TE_BASE_scripts_wfs_1.1.0_ctl_main.html#wfs:wfs-1.1.0-Basic-GetFeature-tc5)

The test result says that the WFS does not provide any data. But, as you can imagine, that's not true.

Here ist the capabilities document: http://onmaps.de/phpWMS4?key=3b8a499f437e2b6c2c164df4f036537d&SERVICE=WFS&version=1.1.0&REQUEST=GetCapabilities

It contains one featuretype: onmaps_alkis_flurstuecksgrenzen. Here is the describeFeatureType request for it: http://onmaps.de/phpWMS4?key=3b8a499f437e2b6c2c164df4f036537d&SERVICE=WFS&version=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=onmaps_alkis_flurstuecksgrenzen

And a getFeature request example: http://onmaps.de/phpWMS4?key=3b8a499f437e2b6c2c164df4f036537d&SERVICE=WFS&version=1.1.0&REQUEST=GetFeature&typename=onmaps_alkis_flurstuecksgrenzen&maxfeatures=1

A XML conformance check with Altova XMLSpy tells me, that all documents are valid.

Here is the content of the java error-log for this test:

2018/09/05-09:13:00 ERROR
Test Name : wfs:wfs-1.1.0-Basic-GetFeature-tc5 type Mandatory
net.sf.saxon.s9api.SaxonApiException: Error in call to extension function {public static org.w3c.dom.Node org.opengis.cite.wfs11.GetFeatureTestExtension.findFeatureTypeAndPropertyName(org.w3c.dom.Node) throws java.lang.Exception}: Extension function requires a single DOM Node; supplied value contains 3 nodes
    at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:192)
    at com.occamlab.te.TECore.executeTemplate(TECore.java:576)
    at com.occamlab.te.TECore.executeTest(TECore.java:787)
    at com.occamlab.te.TECore.callTest(TECore.java:989)
    at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:533)
    at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:256)
    at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:147)
    at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:352)
    at net.sf.saxon.instruct.SimpleContentConstructor.evaluateItem(SimpleContentConstructor.java:261)
    at net.sf.saxon.instruct.ValueOf.processLeavingTail(ValueOf.java:233)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
    at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
    at net.sf.saxon.expr.LetExpression.process(LetExpression.java:380)
    at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
    at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
    at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
    at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
    at net.sf.saxon.Controller.transform(Controller.java:1560)
    at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
    at com.occamlab.te.TECore.executeTemplate(TECore.java:576)
    at com.occamlab.te.TECore.executeTest(TECore.java:787)
    at com.occamlab.te.TECore.reexecute_test(TECore.java:347)
    at com.occamlab.te.TECore.execute(TECore.java:289)
    at com.occamlab.te.TECore.run(TECore.java:2371)
    at java.lang.Thread.run(Thread.java:748)
Caused by: net.sf.saxon.trans.XPathException: Error in call to extension function {public static org.w3c.dom.Node org.opengis.cite.wfs11.GetFeatureTestExtension.findFeatureTypeAndPropertyName(org.w3c.dom.Node) throws java.lang.Exception}: Extension function requires a single DOM Node; supplied value contains 3 nodes
    at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:151)
    at net.sf.saxon.instruct.CopyOf.processLeavingTail(CopyOf.java:292)
    at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
    at net.sf.saxon.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:282)
    at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:295)
    at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:341)
    at net.sf.saxon.expr.LetExpression.process(LetExpression.java:372)
    at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
    at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
    at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
    at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
    at net.sf.saxon.Controller.transform(Controller.java:1560)
    at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
    ... 41 more

the message pointing to the problem is here:

net.sf.saxon.trans.XPathException: Error in call to extension function {public static org.w3c.dom.Node org.opengis.cite.wfs11.GetFeatureTestExtension.findFeatureTypeAndPropertyName(org.w3c.dom.Node) throws java.lang.Exception}: Extension function requires a single DOM Node; supplied value contains 3 nodes

Please can you help me finding the problem?

lgoltz commented 6 years ago

@swen100 Can you provide some more information about the test environment (e.g local environment with docker, version of TEAM Engine and ETS)?

swen100 commented 6 years ago

Hi, I have used the official website with teamengine http://cite.opengeospatial.org/teamengine/

and no local test environment.

lgoltz commented 6 years ago

Thanks! I've tested again with production and a local setup with docker and can see that the test fails with

FAILURE: WFS does not provide data to use in this test 
                      (a feature type with a simple property (string, integer, double, decimal) and data for this property)

This is unexpected as the service provides several appropriate test data. I cannot see the failure and there is no error.log in the downloaded session, but the method GetFeatureTestExtension.findFeatureTypeAndPropertyName is propably the cause of the failure. We will do further investigation.

swen100 commented 6 years ago

Yes, I could see that there was no error log created after the first execution of the tests. But when u execute a test again, then an error.log will be created (bug?).

Here is the newest error.log content:

2018/09/06-03:31:07 ERROR
Test Name : wfs:wfs-1.1.0-Basic-GetFeature-tc5 type Mandatory
net.sf.saxon.s9api.SaxonApiException: Error in call to extension function {public static org.w3c.dom.Node org.opengis.cite.wfs11.GetFeatureTestExtension.findFeatureTypeAndPropertyName(org.w3c.dom.Node) throws java.lang.Exception}: Extension function requires a single DOM Node; supplied value contains 3 nodes
    at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:192)
    at com.occamlab.te.TECore.executeTemplate(TECore.java:576)
    at com.occamlab.te.TECore.executeTest(TECore.java:787)
    at com.occamlab.te.TECore.reexecute_test(TECore.java:347)
    at com.occamlab.te.TECore.execute(TECore.java:289)
    at com.occamlab.te.TECore.run(TECore.java:2371)
    at java.lang.Thread.run(Thread.java:748)
Caused by: net.sf.saxon.trans.XPathException: Error in call to extension function {public static org.w3c.dom.Node org.opengis.cite.wfs11.GetFeatureTestExtension.findFeatureTypeAndPropertyName(org.w3c.dom.Node) throws java.lang.Exception}: Extension function requires a single DOM Node; supplied value contains 3 nodes
    at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:151)
    at net.sf.saxon.instruct.CopyOf.processLeavingTail(CopyOf.java:292)
    at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
    at net.sf.saxon.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:282)
    at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:295)
    at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:341)
    at net.sf.saxon.expr.LetExpression.process(LetExpression.java:372)
    at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
    at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
    at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
    at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
    at net.sf.saxon.Controller.transform(Controller.java:1560)
    at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
    ... 6 more
lgoltz commented 6 years ago

Test data could not be found cause of a namespace issue. In the capabilities document the name of the feature type onmaps_alkis_flurstuecksgrenzen and there is no default namspace binding. In the GML applicationschema as welll as in the GetFeature-response the target respectively default namespace is http://onmaps.de

You should add the default namespace xmlns="http://onmaps.de" in the capabilities document.

swen100 commented 6 years ago

That was it! Thanks a lot!

dying-light commented 4 years ago

@swen100 I met the same problem as you. How did you solve it?

swen100 commented 4 years ago

Hi @dying-light, I had to add a default namespace xmlns="http://xxxxxx" in the capabilities document. See the last comment from Igoltz.