djm24

WFS-T Insert Succeeds but doesn't insert into geodatabase!

Discussion created by djm24 on Feb 13, 2014
I have a DB2 geodatabase setup for for non-versioned editing. I have published a WFS-T service from it and can view the features in a WFS client. I've written some simple code to POST a WFS insert transaction and I get a successful response but no feature is inserted into my database. If I run it again it says succeeded but the ID (F4__1) is always the same. What is going on? Surely if it is failing I should at least see an error somewhere! There is nothing in the server logs. I can perform edits successfully in ArcMap and also via REST on a standard feature server accessing the same service. So it looks like a problem with the way the WFS-T layer communicates with the database.

Request:

<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs"
                 xmlns:gml="http://www.opengis.net/gml"
                 xmlns:ows="http://www.opengis.net/ows"
                 xmlns:ogc="http://www.opengis.net/ogc"
                 xmlns:testMap="http://localhost:6080/arcgis/services/TestMap/MapServer/WFSServer"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd
                                     http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsAll.xsd
                                     http://www.opengis.net/ogc http://schemas.opengis.net/filter/1.1.0/filter.xsd
                                     http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/gml.xsd
                                     http://localhost:6080/arcgis/services/TestMap/MapServer/WFSServer http://localhost:6080/arcgis/services/TestMap/MapServer/WFSServer?request=DescribeFeatureType"
                 service="WFS"
                 version="1.1.0">
    <wfs:Insert>
        <testMap:Crimes>
            <testMap:DESCRIPTION>Snarfity2</testMap:DESCRIPTION>
            <testMap:SHAPE>
                <gml:Point>
                    <gml:pos>52 1</gml:pos>
                </gml:Point>
            </testMap:SHAPE>
        </testMap:Crimes>
    </wfs:Insert>
</wfs:Transaction>


Response:

<wfs:TransactionResponse version='1.1.0' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:gml='http://www.opengis.net/gml' xmlns:ogc='http://www.opengis.net/ogc' xmlns:wfs='http://www.opengis.net/wfs'>
    <wfs:TransactionSummary>
        <wfs:totalInserted>1</wfs:totalInserted>
    </wfs:TransactionSummary>
    <wfs:InsertResults>
        <wfs:Feature>
            <ogc:FeatureId fid='F4__1'></ogc:FeatureId>
        </wfs:Feature>
    </wfs:InsertResults>
</wfs:TransactionResponse>"


Thanks!

Outcomes