Uploaded image for project: 'GeoServer'
  1. GEOS-6885

Fix WFS 2.0 KVP request NAMESPACE specification syntax

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.6.2, 2.7-RC1, 2.7-beta, 2.7.0, 2.8-beta
    • Fix Version/s: 2.13-beta
    • Component/s: WFS
    • Labels:
      None

      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&amp;version=2.0.0&amp;request=GetFeature&amp;count=25&amp;startindex=0&amp;typenames=ns15:streams&amp;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&amp;version=2.0.0&amp;request=GetFeature&amp;count=25&amp;startindex=0&amp;typenames=ns15:streams&amp;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)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              harrison.grundy codehaus (Inactive)
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: