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

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure