I am making a WPS call in OpenLayers which works successfully in Chrome and Firefox but not in IE9. The response from IE tells me
"Process failed during execution\nCould not convert to target type com.vividsolutions.jts.geom.Geometry"
The same code returns intersecting polygons in both other browsers so I think it's down to how IE handles my GML/XML. Can anyone help out?
Code as follows:
function wpsExecute(featureA, featureB, identifier) {
var polygonElement;
if (BrowserInfo.browser == "Chrome") {
polygonElement = "Polygon"
} else {
polygonElement = "gml:Polygon"
}
// set up the process specific parameters
var options = {
// set the wps process
identifier : identifier,
dataInputs : [ {
identifier : "a",
data : {
complexData : {
attributes : {
mimeType : "text/xml",
subtype : "gml/3.1.1"
},
// get the gml:Polygon node from the xml DOM
value : featureA.getElementsByTagName(polygonElement)[0]
}
}
}, {
identifier : "b",
data : {
complexData : {
attributes : {
mimeType : "text/xml",
subtype : "gml/3.1.1"
},
// get the gml:Polygon node from the xml DOM
value : featureB.getElementsByTagName(polygonElement)[0]
}
}
} ],
responseForm : {}
};
var format = new OpenLayers.Format.WPSExecute();
// console.log(format.write(options));
try {
OpenLayers.Request.POST({
url : WPS_URL,
data : format.write(options),
async : false,
success : parseExecute,
});
WHERE featureA and featureB are as follows:
var gmlOptions = {
featureType : "feature",
featureNS : "http://example.com/feature"
};
// new gml 3 format
var gml3 = new OpenLayers.Format.GML.v3(gmlOptions);
compareFeatureGml = gml3.write(compareFeature);
var xmlFormat = new OpenLayers.Format.XML();
var featureB = xmlFormat.read(compareFeatureGml);
Thank you all!
