Problem in openlayers wfs-t with geoserver 2.7?

المشرف العام

Administrator
طاقم الإدارة
I'm using OpenLayers-3. I have a wfs layer. I want to sync this layer with my server as follow(I use geoserver 2.7-SNAPSHOT and my datastore's type is shapefile):

var opt = { featureType: "Calk:point", featureNS: "http://itsme.calk.org", srsName: "EPSG:4326"}var s = new XMLSerializer();var url = "http://localhost:8080/geoserver/wfs";var node = wfs.writeTransaction(InsertFeaturesArr, updateFeaturesArr, deleteFeaturesArr, opt);Ext.Ajax.request({ url: 'proxy.cgi?url=' + encodeURIComponent(url), method: 'POST', xmlData: s.serializeToString(node), headers: { 'Content-Type': 'text/xml' }, success: function(response_) { response = response_; }});It create a payload request as follow:

44.53857421875 25.492868271257123 ... asdf the_geom 29.614517211914062 52.532684326171875 ... It doesn't work properly. Geoserver's response is as follow:

1 2 3 In this case, it must add a feature with NAME property: asdf(it does not add new feature), and update a feature(It does not update any feature), and delete a feature(It do this correctly). But when I create 3 request and as follow, It doesn't delete the feature some times:

var insertNode = wfs.writeTransaction(InsertFeaturesArr, [], [], opt);Ext.Ajax.request({ ... xmlData: s.serializeToString(insertNode), ...});var updateNode = wfs.writeTransaction([], updateFeaturesArr [], opt);Ext.Ajax.request({ ... xmlData: s.serializeToString(updateNode), ...});var deleteNode = wfs.writeTransaction([], [], deleteFeaturesArr, opt);Ext.Ajax.request({ ... xmlData: s.serializeToString(deleteNode), ...});Where is the problem?
I tested this code with geoserver 2.8 t0o and it does not correctly too.



أكثر...
 
أعلى