Bug report #20064
QGIS Server WFS Update Transaction bug
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
History
#1 Updated by Uroš Preložnik about 6 years ago
Pull request: https://github.com/qgis/QGIS/pull/8155
#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
Applied in changeset qgis|fff0c0309994a1da1d381108819054f3eb6dfefa.