diff --git a/lib/OpenLayers/Format/WFS.js b/lib/OpenLayers/Format/WFS.js index 9ac6d4a21d..a012234850 100644 --- a/lib/OpenLayers/Format/WFS.js +++ b/lib/OpenLayers/Format/WFS.js @@ -135,7 +135,8 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, { update: function(feature) { if (!feature.fid) { OpenLayers.Console.userError(OpenLayers.i18n("noFID")); } var updateNode = this.createElementNS(this.wfsns, 'wfs:Update'); - updateNode.setAttribute("typeName", this.layerName); + updateNode.setAttribute("typeName", this.featurePrefix + ':' + this.featureName); + updateNode.setAttribute("xmlns:" + this.featurePrefix, this.featureNS); var propertyNode = this.createElementNS(this.wfsns, 'wfs:Property'); var nameNode = this.createElementNS(this.wfsns, 'wfs:Name'); @@ -194,7 +195,8 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, { return false; } var deleteNode = this.createElementNS(this.wfsns, 'wfs:Delete'); - deleteNode.setAttribute("typeName", this.layerName); + deleteNode.setAttribute("typeName", this.featurePrefix + ':' + this.featureName); + deleteNode.setAttribute("xmlns:" + this.featurePrefix, this.featureNS); var filterNode = this.createElementNS(this.ogcns, 'ogc:Filter'); var filterIdNode = this.createElementNS(this.ogcns, 'ogc:FeatureId'); diff --git a/tests/Format/WFS.html b/tests/Format/WFS.html new file mode 100644 index 0000000000..113e219f11 --- /dev/null +++ b/tests/Format/WFS.html @@ -0,0 +1,81 @@ + + + + + + +
+
+ + diff --git a/tests/list-tests.html b/tests/list-tests.html index 713ccf5662..9875524a9a 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -57,6 +57,7 @@
  • Format/Filter/v1_0_0.html
  • Format/Filter/v1_1_0.html
  • Format/WFSDescribeFeatureType.html
  • +
  • Format/WFS.html
  • Format/WFST.html
  • Format/WFST/v1.html
  • Format/WFST/v1_0_0.html