<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
hi yvan,<br>
<br>
I have push a new version of the WFS client, with a flag allowing to
send only POST request, because geoserver seems to have issues with XML
filter in the GET request.<br>
I ran the following piece of code on two open geoserver that i found on
the net (<a class="moz-txt-link-freetext" href="http://apps.who.int/tools/geoserver/wfs">http://apps.who.int/tools/geoserver/wfs</a> and
<a class="moz-txt-link-freetext" href="http://ogc.gbif.org/wfs">http://ogc.gbif.org/wfs</a>)<br>
The clients works i receive the feature :<br>
<br>
public static void main(String[] args) throws URISyntaxException,
DataStoreException, MalformedURLException,
NoSuchAuthorityCodeException, FactoryException {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // here the "true" means POST REQUEST<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WFSDataStore pDS = new WFSDataStore(new
URI(<a class="moz-txt-link-rfc2396E" href="http://ogc.gbif.org/wfs">"http://ogc.gbif.org/wfs"</a>), true);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pDS != null) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PropertyName p = new DefaultPropertyName("geom");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double[] min = {-10, -10};<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double[] max = {10, 10};<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DefaultBoundingBox env = new DefaultBoundingBox(min, max);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; env.setCoordinateReferenceSystem(crs);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DefaultLiteral&lt;Envelope&gt; lit = new
DefaultLiteral&lt;Envelope&gt;(env);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Filter filter = new DefaultBBox(p, lit);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FeatureReader reader =
pDS.getFeatureReader(QueryBuilder.filtered(new
DefaultName(<a class="moz-txt-link-rfc2396E" href="http://gbif.org/geobon/demo">"http://gbif.org/geobon/demo"</a>, "cluster10"), filter));<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (reader.hasNext()) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(reader.next());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("the datastore is null");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
I hope, this will work for you.<br>
<br>
Guilhem Legal<br>
<br>
<br>
<br>
On 27/09/2010 17:54, Guilhem wrote:
<blockquote cite="mid:4CA0BE31.3000607@geomatys.fr" type="cite">
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
hello yvan,<br>
  <br>
We didn't really try to use the geotk WFS client with either Geoserver
or ArcGis. At least if we have used it, it was with Constellation-SDI. <br>
I'll try to run some tests with Geoserver in the next days to see what
are the issues.<br>
  <br>
Guilhem Legal<br>
  <br>
On 27/09/2010 08:14, Riou Yvan N2A (DAS SDMOL) wrote:
  <blockquote
 cite="mid:F8D0FCF49FBCA441B7EFD629E4625867EB65D2@wappmese1be1.ad.gendarmerie.fr"
 type="cite">
    <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
    <meta content="MSHTML 6.00.6000.17023" name="GENERATOR">
    <div><font face="Arial" size="2"><span class="116545705-27092010">Good
morning,</span></font></div>
    <div><font face="Arial" size="2"><span class="116545705-27092010"></span></font>&nbsp;</div>
    <div><font face="Arial" size="2"><span class="116545705-27092010">Since
some
weeks, I'm trying to use geotoolkit-pending (with the last
SNAPSHOT everyday) and particularly the WFS client (1.1.0) which seems
to have inconsitencies while handling features from Geoserver
(different versions) and ArcGIS Server (as WFS Server version 9.3.1)
datastore. Are your tests against those WFS OK or do you also having
problems </span></font><font face="Arial" size="2"><span
 class="116545705-27092010">?</span></font></div>
    <div><font face="Arial" size="2"><span class="116545705-27092010"></span></font>&nbsp;</div>
    <div><font face="Arial" size="2"><span class="116545705-27092010">Thanks
a
lot for your works.</span></font></div>
    <div><font face="Arial" size="2"><span class="116545705-27092010"></span></font>&nbsp;</div>
    <div><font face="Arial" size="2"><span class="116545705-27092010">yvan.</span></font></div>
    <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Geotoolkit mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:Geotoolkit@lists.osgeo.org">Geotoolkit@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/geotoolkit">http://lists.osgeo.org/mailman/listinfo/geotoolkit</a>
  </pre>
  </blockquote>
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Geotoolkit mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Geotoolkit@lists.osgeo.org">Geotoolkit@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geotoolkit">http://lists.osgeo.org/mailman/listinfo/geotoolkit</a>
  </pre>
</blockquote>
<br>
</body>
</html>