Hi list,
I found the answer in the tests for the WPSExecute format:
https://github.com/openlayers/openlayers/blob/master/tests/Format/WPSExecute.html#L519.
So "Yes", the WPSExecute does support wfs query references that with
filters.
Here's what I added to make it work, data being an instance of
OpenLayers.Protocol.WFS.v1 :
if (data.defaultFilter) {
input.reference.body.wfs.filter = data.defaultFilter;
}
On the app side, here's how I use the WPSProcess object:
wpsProcessBoundary.execute({
inputs: {
'InputPolygon': wfsProtocol
},
output: "Result",
success: function(outputs) {
console.log(outputs);
}
});
So everything's working fine for me now. Still, I'd be happy to hear
about my approach, that being sending a wfs protocol as input data and
using its inner defaultFilter property as the way to know if the
protocol is using a filter or not. Comments would be welcome.
Thanks,
Alexandre
On 14-08-27 10:08 AM, Alexandre Dubé wrote:
Hi list,
I would like to know if the WPSExecute format support references to
a WFS query with a filter, something like the attached file (I
manually created). I'm using the WPSClient object, which is simple to
use, and I'm currently overriding the WPSProcess 'setInputData' method
in order to support having a OpenLayers.Protocol.WFS.v1 object defined
as the 'data' parameter value, which sets the input.reference
accordingly as such:
input.reference = {
mimeType: "text/xml; subtype=wfs-collection/1.0",
href: data.url,
method: "POST",
body: {
wfs: {
version: "1.0.0",
outputFormat: "GML2",
featureType: data.featureType
}
}
}
if (data instanceof OpenLayers.Protocol.WFS.v1_1_0) {
input.reference.mimeType = "text/xml;
subtype=wfs-collection/1.1";
input.reference.body.wfs.version = "1.1.0";
}
The above produces the <wfs:GetFeature> with a single <wfs:Query>
node. What I need to figure out is how use the filters that are set
in the protocol to produce the <ogc:Filter> to add to the query node.
Does OpenLayers support that ? Any hint ?
I'm using OpenLayers latest version from GitHub.
Thanks,
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Alexandre Dubé
T: +1 418-696-5056 #203
http://www.mapgears.com/
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users