[Geoserver-devel] [JIRA] (GEOS-7357) WFS transactionUpdateGeometry fails for some valid xml requests created by QGIS

maxx created an issue

GeoServer / BugGEOS-7357

WFS transactionUpdateGeometry fails for some valid xml requests created by QGIS

Issue Type:

BugBug

Affects Versions:

2.7.1

Assignee:

Unassigned

Components:

WFS

Created:

19/Dec/15 10:05 AM

Environment:

Amazon EC2 t2.micro linux ami
Tomcat 7
QGIS any version on any platform starting from 2.6. I didn’t test it on previous versions.

Priority:

MediumMedium

Reporter:

maxx

I created a postgis table with an index field, a text field, a geometry field:

{{CREATE TABLE test (
gid integer DEFAULT nextval(‘test_gid_seq’::regclass) NOT NULL,
nome character varying(100),
geom geometry(MultiLineString,4326)
);}}

In geoserver I created a layer connected to that table.

In QGIS I created a WFS vector layer connected to the geoserver layer.
I edit a feature. When I commit QGIS notifies me of the following error:

> Transaction failed

> org.geoserver.wfs.WFSTransactionException: Update error:

> java.lang.String cannot be cast to com.vividsolutions.jts.geom.Geometry

I tried to execute it in the demo requests and got the same error.
I put the request as logged by geoserver at the end of this field (I can’t attach files: JIRA could not attach the file as there was a missing token. Please try attaching the file again.)

I changed the request till I could get it to work.
I started from the xml created by the demo requests tool and modified the tags from the outer tag to transform it to an xml similar to the qgis-generated one. First I modified the transaction tag followed by the Update tag and so on.
The transactions were successful up to when I used the following xml:

{{<Transaction xmlns=“http://www.opengis.net/wfs” service=“WFS”
version=“1.0.0”
xmlns:ws1=“http://."
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:wfs=“http://www.opengis.net/wfs
xmlns:gml=“http://www.opengis.net/gml
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation="http://
.
http://.:8080/geoserver/wfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=ws1:test&amp;SRSNAME=EPSG:4326&amp;username=user1&amp;password=***”>
<Update xmlns=“http://www.opengis.net/wfs” typeName=“ws1:test”>
<Property xmlns=“http://www.opengis.net/wfs”>
<Name xmlns=“http://www.opengis.net/wfs”>geom</Name>
<Value xmlns=“http://www.opengis.net/wfs”>
<gml:MultiLineString
srsName=“http://www.opengis.net/gml/srs/epsg.xml#4326”>
<gml:lineStringMember>
<gml:LineString>
<gml:coordinates>8.00003043999999974,44.23241551000000271
8.00578959672930246,44.17149441442651892
8.06909135999999982,44.16719473999999934</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
</gml:MultiLineString>
</Value>
</Property>
<ogc:Filter>
<ogc:FeatureId fid=“test.4”/>
</ogc:Filter>
</Update>
</Transaction>}}

The problem seems to be in the Value tag.
If the xml has &lt;wfs:Value&gt;...&lt;/wfs:Value&gt; it works.
If I change it to &lt;Value xmlns="http://www.opengis.net/wfs"&gt;...&lt;/Value&gt;
I get the aforementioned error.

Transaction failing:
{{<Transaction xmlns=“http://www.opengis.net/wfs” service=“WFS”
version=“1.0.0”
xmlns:ws1=“http://."
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:wfs=“http://www.opengis.net/wfs
xmlns:gml=“http://www.opengis.net/gml
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation="http://
.
http://.:8080/geoserver/wfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=ws1:test&amp;SRSNAME=EPSG:4326&amp;username=user1&amp;password=***”>
<Update xmlns=“http://www.opengis.net/wfs” typeName=“ws1:test”>
<Property xmlns=“http://www.opengis.net/wfs”>
<Name xmlns=“http://www.opengis.net/wfs”>geom</Name>
<Value xmlns=“http://www.opengis.net/wfs”>
<gml:MultiLineString
srsName=“http://www.opengis.net/gml/srs/epsg.xml#4326”>
<gml:lineStringMember>
<gml:LineString>
<gml:coordinates>8.00003043999999974,44.23241551000000271
8.00578959672930246,44.17149441442651892
8.06909135999999982,44.16719473999999934</gml:coordinates>
</gml:LineString>
</gml:lineStringMember>
</gml:MultiLineString>
</Value>
</Property>
<ogc:Filter>
<ogc:FeatureId fid=“test.4”/>
</ogc:Filter>
</Update>
</Transaction>}}

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v7.1.0-OD-02-030#71001-sha1:2ba8c0f)

Atlassian logo