The remote WFS conforms to the specifications used (XML, WFS, GML, Filter Encoding). It may be somewhat strict, but it is not "broken".
Furthermore, while the request is "well-formed" as XML, it is at least problematic because it uses a GML property without specifying which namespace it belongs to.
Let me try to explain briefly why this is so:
The DescribeFeatureType response is a GML Application Schema and defines the feature and its properties in a specific XML Namespace (here: targetNamespace="http://repository.gdi-de.org/schemas/adv/produkt/alkis-vereinfacht/2.0"
). The GML Property geometry
is therefore contained in this namespace.
A compliant WFS expects that all elements that refer to a GML Application Schema are also specified in this namespace in the GetFeature-Request. This can be done either by a prefix (in the example ave:geometrie
) or by using the default namespace (geometrie
). In the first case, the ave
prefix has to be defined in the WFS request (xmlns:ave="http://repository.gdi-de.org/schemas/adv/produkt/alkis-vereinfacht/2.0"
). In the latter case, the default namespace would have to be defined in the WFS request (xmlns="http://repository.gdi-de.org/schemas/adv/produkt/alkis-vereinfacht/2.0"
).
Note that the property geometrie
is used in two places in the request: In wfs:PropertyName
(Web Feature Service) and in ogc:PropertyName
(Filter Encoding).
However, according to the OGC specification WFS 1.1, wfs:PropertyName
is a QName [1]. Therefore, the GML Property has to belong to a specific namespace (which can be done either via a prefix or via default namespace). Since the property geometrie
refers to no namespace, the observed exception occurs at this point.
In the case of the second element, ogc:PropertyName
, according to the schema (Filter Encoding 1.1 [2]) it would not necessarily have to be a QName, but the description in the OGC specification for Filter Encoding 1.1 can also be interpreted in such a way that a QName is expected here. In the implementation of the remote WFS, a uniform behaviour analogous to wfs:PropertyName
was chosen. So the WFS also expects a QName in ogc:PropertyName
.
One could perhaps theoretically adapt the remote WFS so that it would be more fault-tolerant in some very simple cases. But it could work only for ogc:PropertyName
. wfs:PropertyName
must still be a valid QName (incorrent values are already recognised and rejected by the XML parser).
On the other hand, the solution for correcting the request would be simple:
- Add default namespace to the root element
wfs:GetFeature
(xmlns="http://repository.gdi-de.org/schemas/adv/produkt/alkis-vereinfacht/2.0"
). Alternatively, adding the default namespace to wfs:Query
or both wfs:PropertyName
and ogc:PropertyName
would also work.
- Doing so you can use
geometrie
without prefix.
- Or add the prefix
ave
to the property names (ave:geometry
).
- Or omit the two elements
wfs:PropertyName
and ogc:PropertyName
with geometrie
.
References: