Hi,
I had a problem with using field named “name” in GeoServer WFS service. That problem has been resolved with Overriding GML Attributes but raised more questions.
Is it a valid request to GeoServer having namespace in the path?
Is the above request equivalent to this?
http://localhost:8080/geoserver/wfs/service?service=wfs&version=1.1.0&request=DescribeFeatureType&TypeName=ne:populated_places
“name” field is missing from the response when there is namespace in the path (first one).
(Try this with Override GML Attributes enabled in WFS settings with geoserver Natural Earth demo dataset.)
What is the expected behavior here?
What is setting GML 3.2 on/off responsible for? (Is it responsible for overriding gml in WFS 2.0.0 requests?)
I have run WFS queries with different versions testing Natural Earth demo dataset with/without namespace in the path and also setting Override GML Attributes on/off.
Test summary:
-
If there is namespace in the path, no “name” field is returned for WFS version 1.1.0 and 2.0.0 requests regardless of the state of settings.
-
If there is namespace in the path, “name” field is always returned for WFS version 1.0.0 request regardless of the state of settings. (This is really good that we always have a way to get correct response.)
-
Setting Override GML Attributes for GML 3.2 on/off has no effect on this matter in any of these test cases (Possibly 2.0.0 requests are routed to GML 3 because when it’s state changes there is an effect on 2.0.0 request).
# Test requests
# Request without namespace
curl -XGET "http://localhost:8080/geoserver/wfs/service?service=wfs&version=1.0.0&request=DescribeFeatureType&TypeName=ne:populated_places" -o ne_populated_places_1.0.0.xsd
curl -XGET "http://localhost:8080/geoserver/wfs/service?service=wfs&version=1.1.0&request=DescribeFeatureType&TypeName=ne:populated_places" -o ne_populated_places_1.1.0.xsd
curl -XGET "http://localhost:8080/geoserver/wfs/service?service=wfs&version=2.0.0&request=DescribeFeatureType&TypeNames=ne:populated_places" -o ne_populated_places_2.0.0.xsd
# Request with namespace
curl -XGET "http://localhost:8080/geoserver/ne/wfs/service?service=wfs&version=1.0.0&request=DescribeFeatureType&TypeName=ne:populated_places" -o ne_populated_places_1.0.0_ne.xsd
curl -XGET "http://localhost:8080/geoserver/ne/wfs/service?service=wfs&version=1.1.0&request=DescribeFeatureType&TypeName=ne:populated_places" -o ne_populated_places_1.1.0_ne.xsd
curl -XGET "http://localhost:8080/geoserver/ne/wfs/service?service=wfs&version=2.0.0&request=DescribeFeatureType&TypeNames=ne:populated_places" -o ne_populated_places_2.0.0_ne.xsd