<html>
  <head>
    <meta content="text/html; charset=ISO-8859-15"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 05/21/2013 10:57 AM, Even Rouault
      wrote:<br>
    </div>
    <blockquote cite="mid:1369123062.519b28f62a3a5@imp.free.fr"
      type="cite">
      <pre wrap="">Selon Ari Jolma <a class="moz-txt-link-rfc2396E" href="mailto:ari.jolma@gmail.com"><ari.jolma@gmail.com></a>:

</pre>
      <blockquote type="cite">
        <pre wrap="">Even,

Another strange thing with GDAL WFS driver. Earlier it did not try to
access the HEAD of a XXX.resolved.gml and now it does:

Here's an excerpt from my server logs. These calls are created by GDAL,
the first is a good GetFeature call, which gets 215633 bytes of GML and
the next is bogus. I can see this made up in ogrgmldatasource.cpp but do
not understand why. In February this did not happen and GDAL parsed the
GML the WFS provided fine (it actually created by GDAL too).

213.157.86.72 - ajolma [21/May/2013:00:02:56 +0300] "GET

</pre>
      </blockquote>
      <pre wrap="">/OILRISK-protected/wfs.pl?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=OILRISK.vtest.geom
</pre>
      <blockquote type="cite">
        <pre wrap="">HTTP/1.1" 200 215633
213.157.86.72 - ajolma [21/May/2013:00:02:58 +0300] "HEAD

</pre>
      </blockquote>
      <pre wrap="">/OILRISK-protected/wfs.pl?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=OILRISK.vtest.resolved.gml
</pre>
      <blockquote type="cite">
        <pre wrap="">HTTP/1.1" 200 -

Do you have an idea what's going on here?
</pre>
      </blockquote>
      <pre wrap="">
Ari,

I don't remind a recent change that might have affected this (but my memory can
be fragile), but reviewing the GML driver code, the fact that .resolved.gml is
probed means that the GML driver doesn't recognize the first bytes of the
GetFeature response to be a GML WFS document. Could you paste them ?</pre>
    </blockquote>
    <br>
    <pre id="line1"><span class="pi"><?xml version="1.0" encoding="utf-8" ?></span><span>
<span id="line2"></span></span><span><<span class="start-tag">ogr:FeatureCollection</span>
<span id="line3"></span>     <span class="attribute-name">xmlns:xsi</span>="<a class="attribute-value">http://www.w3.org/2001/XMLSchema-instance</a>"
<span id="line4"></span>     <span class="attribute-name">xsi:schemaLocation</span>="<a class="attribute-value">http://ogr.maptools.org/ .xsd</a>"
<span id="line5"></span>     <span class="attribute-name">xmlns:ogr</span>="<a class="attribute-value">http://ogr.maptools.org/</a>"
<span id="line6"></span>     <span class="attribute-name">xmlns:gml</span>="<a class="attribute-value">http://www.opengis.net/gml</a>"></span><span>
<span id="line7"></span>  </span><span><<span class="start-tag">gml:featureMember</span>></span><span>
<span id="line8"></span>    </span><span><<span class="start-tag">ogr:vtest_geom_</span> <span class="attribute-name">fid</span>="<a class="attribute-value">vtest_geom_.0</a>"></span><span>
<span id="line9"></span>      </span><span><<span class="start-tag">ogr:geometryProperty</span>></span><span></span><span><<span class="start-tag">gml:Point</span> <span class="attribute-name">srsName</span>="<a class="attribute-value">EPSG:3067</a>"></span><span></span><span><<span class="start-tag">gml:coordinates</span>></span><span>185607.11328746471554,6718884.468898030929267</span><span></<span class="end-tag">gml:coordinates</span>></span><span></span><span></<span class="end-tag">gml:Point</span>></span><span></span><span></<span class="end-tag">ogr:geometryProperty</span>></span><span>
<span id="line10"></span>      </span><span><<span class="start-tag">ogr:id</span>></span><span>6483</span><span></<span class="end-tag">ogr:id</span>></span><span>
<span id="line11"></span>    </span><span></<span class="end-tag">ogr:vtest_geom_</span>></span><span>
<span id="line12"></span>  </span><span></<span class="end-tag">gml:featureMember</span>></span><span></span></pre>
    ...<br>
    <br>
    <blockquote cite="mid:1369123062.519b28f62a3a5@imp.free.fr"
      type="cite">
      <pre wrap=""> My
hypothesis would be that the FeatureCollection root element is in a XML
namespace different from none, gml or wfs.</pre>
    </blockquote>
    <br>
    It seems to be in ogr (it's made by GDAL). I'll try changing that.<br>
    <br>
    <blockquote cite="mid:1369123062.519b28f62a3a5@imp.free.fr"
      type="cite">
      <pre wrap="">

Does the probing of .resolved.gml, apart from slowing down the process, prevent
the driver to parse the GetFeature document ?</pre>
    </blockquote>
    <br>
    yes, the resolved.gml is not older than the GetFeature doc, thus it
    is used and found to be empty. I commented that out but it still
    can't parse the features.<br>
    <br>
    <blockquote cite="mid:1369123062.519b28f62a3a5@imp.free.fr"
      type="cite">
      <pre wrap=""> I think it should not, but there
might be subtle issues since it will probably not use the schema obtained with
DescribeFeatureType to return the GML layer.</pre>
    </blockquote>
    <br>
    It is using the schema it got from DescribeFeature.<br>
    <br>
    About the OpenSSL problem. I can probably bypass it by using only
    Curl (there are Perl bindings to Curl)<br>
    <br>
    Ari<br>
    <br>
    <br>
    <blockquote cite="mid:1369123062.519b28f62a3a5@imp.free.fr"
      type="cite">
      <pre wrap="">

Even
</pre>
    </blockquote>
    <br>
  </body>
</html>