[Geoserver-devel] [jira] (GEOS-6885) Fix WFS 2.0 KVP request NAMESPACE specification syntax

Marcus Sen created an issue

GeoServer / BugGEOS-6885

Fix WFS 2.0 KVP request NAMESPACE specification syntax

Issue Type:

BugBug

Affects Versions:

2.6.2, 2.7-beta

Assignee:

Andrea Aime

Components:

WFS

Created:

16/Feb/15 10:55 AM

Environment:

Windows 7, Tomcat 8, Oracle Java 1.7

Priority:

MajorMajor

Reporter:

Marcus Sen

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%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 [ns15]</ows:ExceptionText></ows:Exception>

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

(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)

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo