Bug report #20064

QGIS Server WFS Update Transaction bug

Added by Uroš Preložnik about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:Uroš Preložnik
Category:QGIS Server
Affected QGIS version:3.3(master) Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27886

Description

WFS Update transaction only works if there is only one Property element in transaction (meaning one field or geometry). If you add more fields then you get server error. It is easy repeatable with QGIS Desktop as WFS client.

Basically this works (we have only one Property element):

<Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Update typeName="wfs:points" xmlns:wfs="http://www.qgis.org/gml">
        <Property>
            <Name>name1</Name>
            <Value>value1</Value>
        </Property>
        <Filter xmlns="http://www.opengis.net/ogc">
            <FeatureId fid="points.115"/>
        </Filter>
    </Update>
</Transaction>

And this doesn't work (two property elements):

<Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Update typeName="wfs:points" xmlns:wfs="http://www.qgis.org/gml">
        <Property>
            <Name>name1</Name>
            <Value>value1</Value>
        </Property>
        <Property>
            <Name>name2</Name>
            <Value>value2</Value>
        </Property>
        <Filter xmlns="http://www.opengis.net/ogc">
            <FeatureId fid="points.115"/>
        </Filter>
    </Update>
</Transaction>

I prepared pull request for this (not tested, but will be with nightly build)

Associated revisions

Revision fff0c030
Added by René-Luc ReLuc about 6 years ago

Merge pull request #8155 from uprel/master

Fixes #20064: Bug in Server WFS update transaction

History

#2 Updated by Uroš Preložnik about 6 years ago

Error from server is: 400 Bad Request:

<ServiceExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ogc">
 <ServiceException code="RequestNotWellFormed">Update action element must have one or more Property element</ServiceException>
</ServiceExceptionReport>

#3 Updated by René-Luc ReLuc about 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF