Closed mlaghi closed 4 years ago
Thank you for reporting.
@keshav-nangare Can you please analyse this issue?
@mlaghi
Can you please provide service to reproduce this issue?
@keshav-nangare Can you please check if the test can be updated to use custom namespaces as well?
I could not find the branch in which you did the fix so I re-ran the test with the master/head branch which is still failing. Meanwhile we made the service available from the internet. You can access the service under:
https://wfst.axl.aero/AxlRest/wfs?SERVICE=WFS&VERSION=2.0.2&REQUEST=GetCapabilities
@mlaghi
I have tried to reproduce the reported issue with the above service but get the different error as follows:
Exception:
Expected one or more feature instances in response (type: {http://www.avitech.aero/axl/wfs/2.0/demo}Person). expected [true] but found [false]
Request:
URL: https://wfst.axl.aero/AxlRest/wfs
Body:
<CreateStoredQuery xmlns="http://www.opengis.net/wfs/2.0" service="WFS" version="2.0.0">
<StoredQueryDefinition xmlns:xsd="http://www.w3.org/2001/XMLSchema"
id="urn:example:wfs2-query:GetFeatureByTypeName">
<Title>GetFeatureByTypeName</Title>
<Abstract>Returns feature representations by type name.</Abstract>
<Parameter name="typeName" type="xsd:QName">
<Abstract>Qualified name of feature type (required).</Abstract>
</Parameter>
<QueryExpressionText isPrivate="false"
language="urn:ogc:def:queryLanguage:OGC-WFS::WFSQueryExpression"
returnFeatureTypes="">
<Query typeNames="${typeName}"/>
</QueryExpressionText>
</StoredQueryDefinition>
</CreateStoredQuery>
Outputs:
<cnt:rest><CreateStoredQueryResponse xmlns="http://www.opengis.net/wfs/2.0" status="OK"/></cnt:rest>
@keshav-nangare I get the same error, however the error occurs not when storing the query but when executing it with GetFeature (the next operation done by the testsuite). The error you mention is then a consequence since:
Thank you for details.
@mlaghi
I have added a fix for it, now it will use the appropriate prefix. Can you please check? Let me know if still facing this issue.
Thank you!!
I just ran the issue#160 branch and I can confirm that the test now behaves as expected and correctly. Thanks. In my opinion this issue can be closed.
The stored query was successfully created but when it is invoked with GetFeature it fails because the query lacks the namespace definition (here it would be
xmlns:tns="http://www.avitech.aero/axl/wfs/2.0/demo"
) and thereby even if the XML is valid it lacks the binding between the prefix tns and its associated uri:`