Bug report #13065

WFS 1.0.0 Client requests with a GML component fail against Geoserver (lack namespace)

Added by Jeff G over 8 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WFS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21135

Description

WFS 1.0.0 Client requests made from QGIS 2.8.1 will fail against Geoserver (tested on 2.7.1) if the request contains a Filter that uses geometries.

From the WFS log console:

DescribeFeatureType failed for url http://localhost:8080/geoserver/ows?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=xxxx:yyyy&SRSNAME=EPSG:4326&FILTER=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
             <ogc:Intersects>
              <ogc:PropertyName>geometry</ogc:PropertyName>
              <gml:Point>
               <gml:coordinates cs="," ts=" ">-91.5,34.5</gml:coordinates>
              </gml:Point>
             </ogc:Intersects>
            </ogc:Filter>

Note that the Filter's opening XML tag includes the "ogc" namespace, but it never defines the "gml" namespace.

My naive attempt at debugging: I see that geometryFromGML is overloaded in https://github.com/qgis/QGIS/blob/master/src/core/qgsogcutils.cpp. Only one of them contains logic to set the "gml" namespace, and I suspect that the qgswfsprovider.cpp might be invoking the wrong one.


Related issues

Related to QGIS Application - Bug report #6552: WFS client: Filter Element contains incoherent XML Namesp... Closed 2012-10-21

History

#1 Updated by Jeff G over 8 years ago

For context, in the above case, I had used the expression string builder to issue the filter:
intersects($geometry, geomFromWKT('POINT(-91.5 34.5)'))

The geoserver-side error is:
org.geoserver.platform.ServiceException: org.xml.sax.SAXException: Attempted to construct illegal filter - I dont understand the tag: gml:Point. HINT: tags are case-sensitive!

#2 Updated by Médéric RIBREUX about 8 years ago

  • Affected QGIS version changed from 2.8.1 to master
  • Status changed from Open to Feedback

Hello, bug triage...

this is also true for an attribute filter (tested on QGIS 2.13 master):

DescribeFeatureType failed for url http://geoservices.brgm.fr/geologie?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=MINES_EMP&SRSNAME=EPSG:4326&FILTER=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
             <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>substance</ogc:PropertyName>
              <ogc:Literal>Pb</ogc:Literal>
             </ogc:PropertyIsEqualTo>
            </ogc:Filter>

#3 Updated by Giovanni Manghi about 8 years ago

  • Status changed from Feedback to Open

#4 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Open to Feedback

This must be re-tested with qgis 2.18.*/master as the wfs client has been overhalued meanwhile.

#5 Updated by Giovanni Manghi about 7 years ago

Can anyone advice about the necessary steps to try replicate this issue?

#6 Updated by Jeff G almost 7 years ago

  • Status changed from Feedback to Closed

Now using QGIS 2.18.4, I have tried both the "intersects" and the "attribute" test cases mentioned earlier in this issue, and they both work as expected.

This appears to be fixed. Thank you!

Also available in: Atom PDF