Ray Merkert created GEOS-4946:
---------------------------------
Summary: WFS insert transaction returns incorrect feature id
Key: GEOS-4946
URL: https://jira.codehaus.org/browse/GEOS-4946
Project: GeoServer
Issue Type: Bug
Reporter: Ray Merkert
Assignee: Andrea Aime
I've a got simple setup with a propertyfile store. When I insert a feature into the store, the feature is properly added, but with an automatically assigned id. It's completely ignoring the id I provide in my request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Transaction xmlns="http://www.opengis.net/wfs" xmlns:ns2="http://www.opengis.net/gml" xmlns:ns3="http://www.w3.org/1999/xlink" xmlns:ns4="http://www.w3.org/2001/SMIL20/" xmlns:ns5="http://www.opengis.net/ogc" xmlns:ns6="http://www.opengis.net/ows" xmlns:ns7="http://dkkn.raytheon.com" xmlns:ns8="http://www.w3.org/2001/SMIL20/Language" service="WFS" version="1.1.0"><Insert idgen="UseExisting"><ns7:PointFeature ns2:id="PointFeature.123456789"><ns7:featureName>Boston-WFS</ns7:featureName><ns7:point ns3:type="simple"><ns2:Point srsName="http://www.opengis.net/gml/srs/epsg\.xml\#4326"><ns2:coordinates>10,10</ns2:coordinates></ns2:Point></ns7:point></ns7:PointFeature></Insert></Transaction>
Normally, I could deal with this if the response contained the correct feature id: Here is what I get, though:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:TransactionResponse version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd" xmlns:sf="http://www.openplans.org/spearfish" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ows="http://www.opengis.net/ows" xmlns:wfs="http://www.opengis.net/wfs"><wfs:TransactionSummary><wfs:totalInserted>1</wfs:totalInserted><wfs:totalUpdated>0</wfs:totalUpdated><wfs:totalDeleted>0</wfs:totalDeleted></wfs:TransactionSummary><wfs:TransactionResults/><wfs:InsertResults><wfs:Feature><ogc:FeatureId fid="new0"/></wfs:Feature></wfs:InsertResults></wfs:TransactionResponse>
You can see that it returns new0 as the feature id. Unfortunately, the propertyfile has a completely different id:
_=featureName:String,point:Point:srid=4326
dkknstore.:PointFeature.1328126922861=Boston-WFS|POINT (10 10)
Initially I had thought that geotools was buggy, but now I'm thinking it's the geoserver. I can provide some source code if that helps.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira