Hi,<div><br></div><div>I&#39;m trying to use GWT-OpenLayers to carry out some simple WFS requests. However, I&#39;m having some trouble with OpenLayers not displaying my data.</div><div><br></div><div>I&#39;m using GeoServer as my WFS, which names its layers like &quot;sf:roads&quot;, where &quot;sf&quot; is the namespace.  This first example, where I specify the namespace URL, works fine:</div>

<div><br></div><div>### JAVA CODE ###</div><div><br></div><div><div>WFSProtocolOptions wfsProtocolOptions = new WFSProtocolOptions();</div><div>wfsProtocolOptions.setUrl(&quot;<a href="http://li199-25.members.linode.com:8080/geoserver/wfs">http://li199-25.members.linode.com:8080/geoserver/wfs</a>&quot;);</div>

<div>wfsProtocolOptions.setFeatureType(&quot;roads&quot;);</div><div>wfsProtocolOptions.setFeatureNameSpace(&quot;<a href="http://www.openplans.org/spearfish">http://www.openplans.org/spearfish</a>&quot;);</div><div>wfsProtocolOptions.setSrsName(&quot;EPSG:4326&quot;);</div>

<div>wfsProtocolOptions.setVersion(&quot;1.1.0&quot;);</div></div><div><br></div><div>This results in OpenLayers making the following XML request, which leads to a valid response which is displayed correctly:</div><div><br>

</div><div>### XML GetFeature REQUEST ###</div><div><br></div><div><div class="nodeBox open  "><div class="nodeLabel "><span class="nodeLabelBox repTarget ">&lt;<span class="nodeTag ">wfs:GetFeature</span><span class="nodeAttr editGroup "> <span class="nodeName editable ">xmlns:wfs</span>=&quot;<span class="nodeValue editable "><a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a></span>&quot;</span><span class="nodeAttr editGroup "> <span class="nodeName editable ">service</span>=&quot;<span class="nodeValue editable ">WFS</span>&quot;</span><span class="nodeAttr editGroup "> <span class="nodeName editable ">version</span>=&quot;<span class="nodeValue editable ">1.1.0</span>&quot;</span><span class="nodeAttr editGroup "> <span class="nodeName editable ">xsi:schemaLocation</span>=&quot;<span class="nodeValue editable "><a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd</a></span>&quot;</span><span class="nodeAttr editGroup "> <span class="nodeName editable ">xmlns:xsi</span>=&quot;<span class="nodeValue editable "><a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a></span>&quot;</span><span class="nodeBracket ">&gt;</span></span></div>

<div class="nodeChildBox "><div class="nodeBox textNodeBox  "><div class="nodeLabel "><span class="nodeLabelBox repTarget ">&lt;<span class="nodeTag ">wfs:Query</span><span class="nodeAttr editGroup "> <span class="nodeName editable ">typeName</span>=&quot;<span class="nodeValue editable ">feature:roads</span>&quot;</span><span class="nodeAttr editGroup "> <span class="nodeName editable ">srsName</span>=&quot;<span class="nodeValue editable ">EPSG:4326</span>&quot;</span><span class="nodeAttr editGroup "> <span class="nodeName editable ">xmlns:feature</span>=&quot;<span class="nodeValue editable "><a href="http://www.openplans.org/spearfish">http://www.openplans.org/spearfish</a></span>&quot;</span><span class="nodeBracket editable insertBefore ">&gt;</span><span class="nodeText editable "></span>&lt;/<span class="nodeTag ">wfs:Query</span>&gt;</span></div>

</div></div><div class="nodeCloseLabel ">&lt;/<span class="nodeTag ">wfs:GetFeature</span>&gt;</div><div class="nodeCloseLabel "><br></div><div class="nodeCloseLabel ">However, this next example does not work. Here, I&#39;m only specifying the full layer title &quot;sf:road&quot; and not specifying the namespace.</div>

<div class="nodeCloseLabel "><br></div><div class="nodeCloseLabel ">### JAVA CODE ###</div><div class="nodeCloseLabel "><br></div><div class="nodeCloseLabel "><div>WFSProtocolOptions wfsProtocolOptions = new WFSProtocolOptions();</div>

<div>wfsProtocolOptions.setUrl(&quot;<a href="http://li199-25.members.linode.com:8080/geoserver/wfs">http://li199-25.members.linode.com:8080/geoserver/wfs</a>&quot;);</div><div>wfsProtocolOptions.setFeatureType(&quot;sf:roads&quot;);</div>

<div>wfsProtocolOptions.setSrsName(&quot;EPSG:4326&quot;);</div><div>wfsProtocolOptions.setVersion(&quot;1.1.0&quot;);</div><div><br></div><div>This results in the following XML request being sent. GeoServer handles this request fine and returns a valid FeatureCollection (as far as I can tell, it&#39;s exactly the same as the previous example).  However, for some reason OpenLayers just won&#39;t display it!</div>

<div><br></div><div>### XML GetFeature REQUEST ###</div><div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">&lt;wfs:GetFeature xmlns:wfs=&quot;<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>&quot; service=&quot;WFS&quot; version=&quot;1.1.0&quot; xsi:schemaLocation=&quot;<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd</a>&quot; xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;&gt;&lt;wfs:Query typeName=&quot;sf:streams&quot; srsName=&quot;EPSG:4326&quot;/&gt;&lt;/wfs:GetFeature&gt;</span></div>

<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Does anyone have any idea why OpenLayers won&#39;t display the results of this kind of request?</span></div>

<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Thanks,</span></div>

<div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">Jon</span></div>

</div></div></div>