<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi list,<br>
<br>
I found the answer in the tests for the WPSExecute format:
<a class="moz-txt-link-freetext" href="https://github.com/openlayers/openlayers/blob/master/tests/Format/WPSExecute.html#L519">https://github.com/openlayers/openlayers/blob/master/tests/Format/WPSExecute.html#L519</a>.
So "Yes", the WPSExecute does support wfs query references that with
filters.<br>
<br>
Here's what I added to make it work, data being an instance of
OpenLayers.Protocol.WFS.v1 :<br>
<br>
<pre> if (data.defaultFilter) {</pre>
<pre> input.reference.body.wfs.filter = data.defaultFilter;</pre>
<pre> }</pre>
<br>
On the app side, here's how I use the WPSProcess object:<br>
<br>
<pre> wpsProcessBoundary.execute({</pre>
<pre> inputs: {</pre>
<pre> 'InputPolygon': wfsProtocol</pre>
<pre> },</pre>
<pre> output: "Result",</pre>
<pre> success: function(outputs) {</pre>
<pre> console.log(outputs);</pre>
<pre> }</pre>
<pre> });</pre>
<br>
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.<br>
<br>
Thanks,<br>
<br>
Alexandre<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 14-08-27 10:08 AM, Alexandre Dubé
wrote:<br>
</div>
<blockquote cite="mid:53FDE65F.1040204@mapgears.com" type="cite">Hi
list,
<br>
<br>
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:
<br>
<br>
input.reference = {
<br>
<br>
mimeType: "text/xml; subtype=wfs-collection/1.0",
<br>
<br>
href: data.url,
<br>
<br>
method: "POST",
<br>
<br>
body: {
<br>
<br>
wfs: {
<br>
<br>
version: "1.0.0",
<br>
<br>
outputFormat: "GML2",
<br>
<br>
featureType: data.featureType
<br>
<br>
}
<br>
<br>
}
<br>
<br>
}
<br>
<br>
if (data instanceof OpenLayers.Protocol.WFS.v1_1_0) {
<br>
<br>
input.reference.mimeType = "text/xml;
subtype=wfs-collection/1.1";
<br>
<br>
input.reference.body.wfs.version = "1.1.0";
<br>
<br>
}
<br>
<br>
<br>
<br>
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 ?
<br>
<br>
I'm using OpenLayers latest version from GitHub.
<br>
<br>
Thanks,
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
T: +1 418-696-5056 #203
<a class="moz-txt-link-freetext" href="http://www.mapgears.com/">http://www.mapgears.com/</a></pre>
</body>
</html>