Fix WFS 2.0 KVP request NAMESPACE specification syntax

Description

For some reason the WFS 2.0.0 (and 2.0.2) specifications have changed the way to specify namespace prefixes in KVP requests so for WFS 1.1.0 the format is NAMESPACE=xmlns(prefix=escaped_url) but for WFS 2.0 the format is NAMESPACES=xmlns(prefix,escaped_url). I.e. parameter name has changed from namespace to namespaces and the prefix and url are separated by a comma not an equals sign.

GeoServer currently only recognises the WFS 1.1.0 format with a WFS 2.0.0 request so e.g.

http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&count=25&startindex=0&typenames=ns15:streams&namespaces=xmlns(xml%2Chttp%3A%2F%2Fwww.w3.org%2FXML%2F1998%2Fnamespace)%2Cxmlns(ns15%2Chttp%3A%2F%2Fwww.openplans.org%2Fspearfish)%2Cxmlns(wfs%2Chttp%3A%2F%2Fwww.opengis.net%2Fwfs%2F2.0)ttp%3A%2F%2Fwww.openplans.org%2Fspearfish)%2Cxmlns(wfs%2Chttp%3A%2F%2Fwww.opengis.net%2Fwfs%2F2.0 - http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&count=25&startindex=0&typenames=ns15:streams&namespaces=xmlns(xml%2Chttp%3A%2F%2Fwww.w3.org%2FXML%2F1998%2Fnamespace)%2Cxmlns(ns15%2Chttp%3A%2F%2Fwww.openplans.org%2Fspearfish)%2Cxmlns(wfs%2Chttp%3A%2F%2Fwww.opengis.net%2Fwfs%2F2.0)ttp%3A%2F%2Fwww.openplans.org%2Fspearfish)%2Cxmlns(wfs%2Chttp%3A%2F%2Fwww.opengis.net%2Fwfs%2F2.0

(correct WFS 2.0.0 syntax) fails with

<ows:Exception exceptionCode="InvalidParameterValue" locator="namespace"><ows:ExceptionText>Unknown namespace

but

http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&count=25&startindex=0&typenames=ns15:streams&namespace=xmlns%28xml%3Dhttp%3A%2F%2Fwww.w3.org%2FXML%2F1998%2Fnamespace%29%2Cxmlns%28ns15%3Dhttp%3A%2F%2Fwww.openplans.org%2Fspearfish%29%2Cxmlns%28wfs%3Dhttp%3A%2F%2Fwww.opengis.net%2Fwfs%2F2.0%29 - http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&count=25&startindex=0&typenames=ns15:streams&namespace=xmlns%28xml%3Dhttp%3A%2F%2Fwww.w3.org%2FXML%2F1998%2Fnamespace%29%2Cxmlns%28ns15%3Dhttp%3A%2F%2Fwww.openplans.org%2Fspearfish%29%2Cxmlns%28wfs%3Dhttp%3A%2F%2Fwww.opengis.net%2Fwfs%2F2.0%29

(using WFS 1.1.0 syntax for namespace parameter) works.

Ref:
WFS 1.1.0 standard Section 14.4
WFS 2.0.0/2 standard Section 7.6.6 (http://docs.opengeospatial.org/is/09-025r2/09-025r2.html#67 - http://docs.opengeospatial.org/is/09-025r2/09-025r2.html#67)

Environment

None

Activity

Andre Tzschieter-Otte 
January 10, 2018 at 9:57 AM

The bug is solved in 2.13-beta. It is documentated as GEOS-8406.

codehaus 
April 10, 2015 at 4:19 PM

CodeHaus Comment From: aaime - Time: Sun, 1 Mar 2015 08:21:20 -0600
---------------------
<p>Assigned to the WFS 2.0 protocol original developer</p>

Fixed

Details

Assignee

Reporter

Fix versions

Components

Priority

Created February 16, 2015 at 3:55 PM
Updated November 15, 2021 at 10:47 AM
Resolved January 10, 2018 at 10:08 AM