<div>Sendo novato em OpenSource, comecei por fazer as minhas experiências, na disponibilização de conteúdos no formato WMS.</div>
<div>Chegando o momento de tentar a disponibilizalção de conteúdos em WFS surge a seguinte dificuldade:</div>
<div> </div>
<div>Não aparece qualquer informação no mapa, do layers  wfs.</div>
<div> </div>
<div> </div>
<div>O código utilizado no Js.</div>
<div> </div>
<div> </div>
<div><span lang="PT"><span lang="PT">
<p>var map;<br>OpenLayers.ProxyHost = &quot;proxy.cgi?url=&quot;;</p>
<p><br>function init() {</p>
<p> </p>
<p> bounds = new OpenLayers.Bounds(-52000.0,-185000.0,-48000.0,-180000.0);</p>
<p><br>  var options = {<br>                    maxExtent: bounds,<br>                    maxResolution: 100.64726562499999,<br>                    projection: &quot;EPSG:27493&quot;,<br>          <br>                    units: &#39;m&#39;,<br>
     zoom: 48<br>         };</p>
<p>   map = new OpenLayers.Map(&quot;mapa&quot;,options)</p>
<p>/*</p>
<p>Imagem de base em WMS</p>
<p>*/ </p>
<p>var base = (new OpenLayers.Layer.WMS(<br>                    &quot; Foto 10K&quot;, &quot;<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>&quot;,<br>                    {<br>                        width: &#39;512&#39;,<br>
                        srs: &#39;EPSG:27493&#39;,<br>                        layers: &#39;testes:FotoSTC&#39;<br>                     },{<br>    <br>                    buffer: 0<br>                } ));</p>
<p><br>/*</p>
<p>Informação que se pretende obter, aqui em WMS - Funciona-</p>
<p>*/<br> var Vivenda = new OpenLayers.Layer.WMS(<br>                    &quot;Vivendas)&quot;, <br>                     &quot;<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>&quot;,<br>
                    {<br>                        <br>                        layers: [<br>     &quot;testes:VivendaCasa&quot;,<br><br>    ],<br>    format: &quot;image/gif&quot;,<br>    srs: &#39;EPSG:27493&#39;,<br>    transparent: true</p>

<p>                     },{<br>                    isBaseLayer: false,<br>     <br>                    buffer: 0<br>                }<br>   );</p>
<p> /*</p>
<p>definição do protocolo entre Openlayers e o Geoserver</p>
<p>*/</p>
<p>  var wfslayer = new OpenLayers.Layer.Vector(&quot;WFS&quot;, { strategies: [new OpenLayers.Strategy.BBOX()], <br>  protocol: new OpenLayers.Protocol.WFS({<br>              url: &quot;<a href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</a>&quot;,<br>
  //service:&quot;WFS&quot;,<br>   //version: &quot;1.1.0&quot; ,<br>  request:&quot;GetFeature&quot;,<br>  version: &quot;1.1.0&quot; ,<br>                typeName: &quot;testes:VivendaCasa&quot;,<br>  <br>  OutputFormat:&quot;GML2&quot;<br>
   }) });</p>
<p>  map.addControl(new OpenLayers.Control.LayerSwitcher());</p>
<p>  <br>  map.addLayer(base);<br>  map.addLayer(wfslayer);<br>   map.addLayer(Vivenda);<br>   map.zoomToExtent(bounds)</p>
<p>}<br></p><font size="2">
<p>  </p>
<p>O erro que surge no Browser é:</p>
<p> </p>
<p>Mensagem: &#39;this.featureType.length&#39; é nulo ou não é um objecto<br>Linha: 1026<br>Caráct: 447<br>Código: 0<br>URL: <a href="http://localhost/apps/OpenLayers-2.10/OpenLayers.js">http://localhost/apps/OpenLayers-2.10/OpenLayers.js</a></p>

<p> </p>
<p>Se colocar o URL, no browser:</p>
<p><u><font color="#0000ff"><a href="http://localhost:8080/geoserver/wfs?request=GetFeature&amp;version=1.1.0&amp;typeName=testes:VivendaCasa&amp;outputFormat=GML2">http://localhost:8080/geoserver/wfs?request=GetFeature&amp;version=1.1.0&amp;typeName=testes:VivendaCasa&amp;outputFormat=GML2</a></font></u></p>

<p><u><font color="#0000ff"></font></u> <u><font color="#0000ff"> este retorna o XML sem problemas</font></u></p>
<p><u><font color="#0000ff"></font></u> </p>
<p>Alguém já foi confrontado por este tipo de erro?</p>
<p><u><font color="#0000ff">Cumps Jorge Penedo</font></u></p></font></span></span><span lang="PT"><font size="2"></font></span></div>