Bug report #14420

WFS-T client sends columns in the wrong order

Added by dr - over 8 years ago. Updated about 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:not reproducable
Crashes QGIS or corrupts data:No Copied to github as #:22401

Description

QGIS uses DescribeFeatureType request for WFS layers and in my case DescribeFeatureType response is:

<?xml version='1.0' encoding='UTF-8'?>
<xs:schema targetNamespace='http://nextgis.org/sf' xmlns:rk='http://nextgis.org/sf' xmlns:ogc='http://www.opengis.net/ogc' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:gml='http://www.opengis.net/gml' elementFormDefault='qualified' version='1.0'>
<xs:import namespace='http://www.opengis.net/gml' schemaLocation='http://schemas.opengis.net/gml/2.1.2/feature.xsd'/>
<xs:element name='bogs' type='rk:bogsType' substitutionGroup='gml:_Feature' />
<xs:complexType name='bogsType'>
 <xs:complexContent>
  <xs:extension base='gml:AbstractFeatureType'>
   <xs:sequence>
    <xs:element name ='wkb_geometry' type='gml:PointPropertyType' nillable='true' minOccurs='0' maxOccurs='1'/>
    <xs:element name ='name' type='string' nillable='true' minOccurs='0' maxOccurs='1'/>
    <xs:element name ='desc' type='string' nillable='true' minOccurs='0' maxOccurs='1'/>
    <xs:element name ='layer_id' type='int' nillable='true' minOccurs='0' maxOccurs='1'/>
   </xs:sequence>
  </xs:extension>
 </xs:complexContent>
</xs:complexType>
</xs:schema>

As you can see this response contains section xs:sequence with wkb_geometry element if first place. But when I add new feature and trying to save it - QGIS sends the following request payload:

<Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rk="http://nextgis.org/sf" version="1.0.0" service="WFS" xsi:schemaLocation="http://nextgis.org/sf http://map.rostmuseum2.ru/cgi-bin/wfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=rk:bogs&amp;SRSNAME=EPSG:4326" xmlns:gml="http://www.opengis.net/gml"><Insert xmlns="http://www.opengis.net/wfs">
<bogs xmlns="http://nextgis.org/sf">
    <name xmlns="http://nextgis.org/sf">1</name>
    <desc xmlns="http://nextgis.org/sf">2</desc>
    <layer_id xmlns="http://nextgis.org/sf">3</layer_id>
    <wkb_geometry xmlns="http://nextgis.org/sf"><gml:Point srsName="EPSG:4326"><gml:coordinates cs="," ts=" ">38.43048436256268019,57.03603754838613327</gml:coordinates></gml:Point></wkb_geometry>
</bogs>
</Insert>
</Transaction>

In this XML document - wkb_geometry element is last, but have to be on ther first place of the sequence and I get an error from WFS-server (TinyOWS in my case):

[Fri Mar  4 13:34:31 2016] [ERROR] Element '{http://nextgis.org/sf}wkb_geometry': This element is not expected.
[Fri Mar  4 13:34:31 2016] [ERROR] XML request isn't valid

History

#1 Updated by Giovanni Manghi about 8 years ago

  • Status changed from Open to Feedback

There have been big changes in the wfs client in the last days in master, please give it a try and report back.

#2 Updated by dr - about 8 years ago

Issue still exists. Trying on latest master:

[Mon Apr 11 00:00:24 2016] [ERROR] Element '{http://nextgis.org/sf}wkb_geometry': This element is not expected.

#3 Updated by Giovanni Manghi about 8 years ago

  • Status changed from Feedback to Open

#4 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Open to Feedback

Still true in 2.18/master?

#5 Updated by Giovanni Manghi over 7 years ago

Any feedback about this issue? thanks!

#6 Updated by Giovanni Manghi about 7 years ago

  • Resolution set to not reproducable
  • Status changed from Feedback to Closed

Closing for lack of feedback, please reopen if necessary.

Also available in: Atom PDF