diff --git a/lib/OpenLayers/Format/WPSExecute.js b/lib/OpenLayers/Format/WPSExecute.js
index 9761e1a010..39c3162b4b 100644
--- a/lib/OpenLayers/Format/WPSExecute.js
+++ b/lib/OpenLayers/Format/WPSExecute.js
@@ -203,9 +203,14 @@ OpenLayers.Format.WPSExecute = OpenLayers.Class(OpenLayers.Format.XML, {
schema: complexData.schema
}
});
- node.appendChild(
- this.getXMLDoc().createCDATASection(complexData.value)
- );
+ var data = complexData.value;
+ if (typeof data === "string") {
+ node.appendChild(
+ this.getXMLDoc().createCDATASection(complexData.value)
+ );
+ } else {
+ node.appendChild(data);
+ }
return node;
},
"Reference": function(reference) {
diff --git a/tests/Format/WPSExecute.html b/tests/Format/WPSExecute.html
index 4e9ed6ddd5..112a66b5ee 100644
--- a/tests/Format/WPSExecute.html
+++ b/tests/Format/WPSExecute.html
@@ -413,6 +413,13 @@
' ]]>' +
' ' +
' ' +
+ ' ' +
+ ' GMLPoint' +
+ ' Point as GML' +
+ ' ' +
+ ' 10 10' +
+ ' ' +
+ ' ' +
' ' +
' ' +
' ' +
@@ -442,6 +449,14 @@
value: ""
}
}
+ }, {
+ identifier: "GMLPoint",
+ title: "Point as GML",
+ data: {
+ complexData: {
+ value: OpenLayers.Format.GML.v3.prototype.writers.feature["_geometry"].apply(new OpenLayers.Format.GML.v3({curve: true, surface: true}), [new OpenLayers.Geometry.Point(10, 10)])
+ }
+ }
}],
responseForm: {
responseDocument: {