Bug report #21768

Updated by Jürgen Fischer about 1 year ago


When using the WFS 2.0.0 Compliant "typeNames" with GetFeatures qgis3 fails to retrieve the WFS data. However TypeName works.

TypeNames:
<pre>
>>>url = 'https://geodata.nationaalgeoregister.nl/asbestscholenkaart/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=asbestscholenkaart:asbestscholenkaart'
>>>layer = QgsVectorLayer(url, 'test', 'WFS')
>>>layer.isValid()
False
</pre>

TypeName:
<pre>
>>>url = 'https://geodata.nationaalgeoregister.nl/asbestscholenkaart/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=asbestscholenkaart:asbestscholenkaart'
>>>layer = QgsVectorLayer(url, 'test', 'WFS')
>>>layer.isValid()
True
</pre>

When it fails log Messages shows
<pre>
2019-04-04T13:10:38 WARNING Could not find typename in capabilities for url https://geodata.nationaalgeoregister.nl/asbestscholenkaart/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=asbestscholenkaart:asbestscholenkaart
</pre>

I note #17872 https://issues.qgis.org/issues/17872 saw TypeNames reverted to TypeName for DescribeFeatureType to be WFS2.0.0 compliant for DescribeFeatureType

Back