Mathieu,
this bug is specific to the WFS 2.0 NAMESPACES parameter format
"NAMESPACES=xmlns(prefix,uri)":
[GEOS-6885] Fix WFS 2.0 KVP request NAMESPACE specification syntax
https://osgeo-org.atlassian.net/browse/GEOS-6885
GeoServer accepts the WFS 1.1 NAMESPACE parameter format
"NAMESPACE=xmlns(prefix%3Duri)" on WFS 2.0 requests, but this does not
conform to the standard. The WFS 1.1 parameter is NAMESPACE not
NAMESPACES, and "=" is percent-encoded as "%3D". For example, this
request returns a single feature:
http://noisy.hq.isogeo.fr:6090/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&count=1&namespace=xmlns(foo%3Disogeo)&typenames=foo%3AOpenBeerMap_IDF
Kind regards,
Ben.
On 02/08/17 03:53, Mathieu Cartoixa wrote:
Hi all,
I would like to report a possible bug that would affect all versions of
WFS, on all versions of GeoServer I have tested so far.
Let's take WFS 2.0.0. It is my understanding that the KVP requests are
the translation of the default POST requests in XML in a way that can be
used with a simple GET request. In particular, a feature name is defined
as a QName (XML qualified name), which implies that XML prefixes should
be defined, as they would be in a standard POST request. This is the
specific purpose of the NAMESPACE parameter, as you can see in the OGC
standard (09-025r1
http://portal.opengeospatial.org/files/?artifact_id=39967) in §6.3 and
§7.6.6.
In my experience, no version of GeoServer that I have seen seems to be
able to understand this parameter. The following URLs reference one of
our tests server, please be gentle with it ;-)
We have a feature named Isogeo:OpenBeerMap_IDF, Isogeo being the prefix
by being related to the namespace ... isogeo (sorry for that).
If you call with the default prefix, you get an answer when you should
not as the prefix has not been declared:
http://noisy.hq.isogeo.fr:6090/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&maxFeatures=1000&typeNames=Isogeo%3AOpenBeerMap_IDF
If you declare the prefix, it works as expected:
http://noisy.hq.isogeo.fr:6090/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&maxFeatures=1000&typeNames=Isogeo%3AOpenBeerMap_IDF&namespaces=xmlns%28Isogeo,isogeo%29
If you declare another prefix, it does not work when I think it should :
http://noisy.hq.isogeo.fr:6090/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&maxFeatures=1000&typeNames=foo%3AOpenBeerMap_IDF&namespaces=xmlns%28foo,isogeo%29
What do you think?
Mathieu Cartoixa
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users