<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Olá João,<br><br>Encontro dois problemas no código que enviaste:<br>na instanciação do WFS protocol deves indicar o nameSpace do teu featureType;<br>no nome dos campos deves retirar o prefixo "peniche";<br><br>Experimenta assim:<br><br>Ext.onReady(function() {<br> <br> OpenLayers.ProxyHost = "http://localhost/cgi-bin/proxy.cgi?url=";<br> <br> var store = new GeoExt.data.FeatureStore({ <br> fields: [<br> {name: "id", type: "string"},<br> {name: "toponimia", type: "string"},<br> ], <br> proxy: new
GeoExt.data.ProtocolProxy({<br> protocol: new OpenLayers.Protocol.WFS({<br> url: "http://localhost:8080/geoserver/wfs",<br> version: "1.1.0",<br> featureType: "eixos_via_postgis",<br> featureNS: "http://localhost:8080/geoserver/peniche",<br> srsName: "EPSG:4326" <br> })<br> }),<br> autoLoad:
true<br> });<br><br> var gridPanel = new Ext.grid.GridPanel({<br> title: "States",<br> region: "center",<br> viewConfig: {forceFit: true},<br> store: store,<br> cm: new Ext.grid.ColumnModel({<br> defaults: {<br> sortable: true<br> },<br> columns: [<br> {header: "Name of the State", dataIndex:
"id"},<br> {header: "State ID", dataIndex: "toponimia"}<br> ]<br> })<br> });<br><br> var mainPanel = new Ext.Panel({<br> renderTo: document.body,<br> layout: "border",<br> height: 450,<br> width: 800,<br> items: [gridPanel]<br> });<br>});<br><br>Se continuar a não resultar diz qualquer coisa.<br><br>Cumprimentos,<br>Gabriel Nolasco<br><br><br><br>--- Em <b>seg, 26/4/10, Jonas Blasques <i><tilakapash@gmail.com></i></b> escreveu:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255);
margin-left: 5px; padding-left: 5px;"><br>De: Jonas Blasques <tilakapash@gmail.com><br>Assunto: Re: [Portugal] Re: Pedido "ilegal" ao Geoserver<br>Para: portugal@lists.osgeo.org<br>Data: Segunda-feira, 26 de Abril de 2010, 19:15<br><br><div id="yiv47926498"><br><br>Obrigado pela resposta rápida referente à minha outra questão. Foi um
erro tipográfico muito parvo (não tinha um : no enderço http). Porém
quando o removi verifiquei que efectivamente recebia o GML como resposta
porém depois não a adiciona à página HTML. Como o código por trás é do
GeoExt + Openlayers é-me muito dificil perceber o problema. <br><br>Mais uma nota que pode ajudar: Este código faz parte do workshop OSGeo "<a rel="nofollow" class="reference external" target="_blank" href="http://workshops.opengeo.org/geoext/">Leveraging OGC Services with
GeoExt</a>" adaptado aos meus dados.<br><br>Aqui está o código (apenas GeoExt JS pois não existe nenhum código HTML. É tudo criado pelo GeoExt):<br><br>Ext.onReady(function() {<br> <br> OpenLayers.ProxyHost = "<a rel="nofollow" target="_blank" href="http://localhost/cgi-bin/proxy.cgi?url=">http://localhost/cgi-bin/proxy.cgi?url=</a>";<br>
<br> var store = new GeoExt.data.FeatureStore({<br> <br> fields: [<br> {name: "peniche:id", type: "string"},<br>
{name: "peniche:toponimia", type: "string"},<br>
],<br> <br> proxy: new GeoExt.data.ProtocolProxy({<br> protocol: new OpenLayers.Protocol.WFS({<br> url: "<a rel="nofollow" target="_blank" href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</a>",<br>
version: "1.1.0",<br> featureType: "eixos_via_postgis",<br> srsName: "EPSG:4326"<br> <br> })<br>
}),<br> autoLoad: true<br> });<br><br> var gridPanel = new Ext.grid.GridPanel({<br> title: "States",<br> region: "center",<br>
viewConfig: {forceFit: true},<br> store: store,<br> cm: new Ext.grid.ColumnModel({<br> defaults: {<br> sortable: true<br> },<br>
columns: [<br> {header: "Name of the State", dataIndex: "peniche:id"},<br> {header: "State ID", dataIndex: "peniche:toponimia"}<br>
]<br> })<br> });<br><br> var mainPanel = new Ext.Panel({<br> renderTo: document.body,<br> layout: "border",<br> height: 450,<br>
width: 800,<br> items: [gridPanel]<br> });<br> });<br><br><br>Response Body:<br><br><wfs:featurecollection numberOfFeatures="15" timeStamp="2010-04-26T19:05:59.346+01:00" xsi:schemaLocation="<a rel="nofollow" target="_blank" href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a rel="nofollow" target="_blank" href="http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd">http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd</a> <a rel="nofollow" target="_blank"
href="http://localhost:8080/geoserver/wfs?service=WFS&amp;version=1.1.0&amp;request=DescribeFeatureType&amp;typeName=peniche%3Aeixos_via_postgis">http://localhost:8080/geoserver/wfs?service=WFS&amp;version=1.1.0&amp;request=DescribeFeatureType&amp;typeName=peniche%3Aeixos_via_postgis</a>" xmlns:nyc_roads="<a rel="nofollow" target="_blank" href="http://opengeo.org/nyc_roads">http://opengeo.org/nyc_roads</a>" xmlns:ogc="<a rel="nofollow" target="_blank" href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>" xmlns:tiger="<a rel="nofollow" target="_blank" href="http://www.census.gov">http://www.census.gov</a>" xmlns:cite="<a rel="nofollow" target="_blank" href="http://www.opengeospatial.net/cite">http://www.opengeospatial.net/cite</a>" xmlns:wfs="<a rel="nofollow" target="_blank" href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>" xmlns:topp="<a rel="nofollow" target="_blank"
href="http://www.openplans.org/topp">http://www.openplans.org/topp</a>" xmlns:xsi="<a rel="nofollow" target="_blank" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns:sf="<a rel="nofollow" target="_blank" href="http://www.openplans.org/spearfish">http://www.openplans.org/spearfish</a>" xmlns:ows="<a rel="nofollow" target="_blank" href="http://www.opengis.net/ows">http://www.opengis.net/ows</a>" xmlns:gml="<a rel="nofollow" target="_blank" href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>" xmlns:peniche="<a rel="nofollow" target="_blank" href="http://localhost:8080/geoserver/peniche">http://localhost:8080/geoserver/peniche</a>" xmlns:xlink="<a rel="nofollow" target="_blank" href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>"><br>
<gml:featuremembers><br> <peniche:eixos_via_postgis gml:id="eixos_via_postgis.525309"><br> <peniche:id><br> 1617719<br> </peniche:id><br> <peniche:the_geom><br>
<gml:multilinestring><br> <gml:linestringmember><br> <gml:linestring><br> <gml:poslist><br> -104522.35120000018 -98280.68680000032 -104499.31830000025 -98247.67889999872 -104493.11820000099 -98238.87749999814<br>
</gml:poslist><br> </gml:linestring><br> </gml:linestringmember><br> </gml:multilinestring><br> </peniche:the_geom><br>
</peniche:eixos_via_postgis><br> <peniche:eixos_via_postgis gml:id="eixos_via_postgis.525310"><br> <peniche:id><br> 1617731<br> </peniche:id><br>
<peniche:toponimia><br> PÁTIO DOM FRADIQUE<br> </peniche:toponimia><br> <peniche:the_geom><br> <gml:multilinestring><br> <gml:linestringmember><br>
<gml:linestring><br> <gml:poslist><br> -86869.86780000015 -105649.20809999947 -86855.81780000024 -105637.14840000152 -86838.25229999915 -105621.79619999969 -86820.7352999997 -105610.88449999999<br>
</gml:poslist><br> </gml:linestring><br> </gml:linestringmember><br> </gml:multilinestring><br> </peniche:the_geom><br>
</peniche:eixos_via_postgis><br> <peniche:eixos_via_postgis gml:id="eixos_via_postgis.525311"><br> <peniche:id><br> 1617732<br> </peniche:id><br>
<peniche:toponimia><br> PÁTIO DOM FRADIQUE<br> </peniche:toponimia><br> <peniche:the_geom><br> <gml:multilinestring><br> <gml:linestringmember><br>
<gml:linestring><br> <gml:poslist><br> -86820.7352999997 -105610.88449999999 -86796.99660000118 -105587.82760000147<br> </gml:poslist><br>
</gml:linestring><br> </gml:linestringmember><br> </gml:multilinestring><br> </peniche:the_geom><br> </peniche:eixos_via_postgis><br>
</gml:featuremembers><br></wfs:featurecollection><br><br><br><br>Obrigado mais uma vez,<br><br>João<br><br><br><br><br><br><br><div class="gmail_quote">2010/4/26 Johnnycash <span dir="ltr"><<a rel="nofollow" ymailto="mailto:interlude21@gmail.com" target="_blank" href="/mc/compose?to=interlude21@gmail.com">interlude21@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
Professor Jorge Gustavo :)<br>
<br>
Um abraço do seu aluno em Programação e Sig do Mestrado da Flup em SIG.<br>
<br>
João Matos!<br>
<font color="#888888">--<br>
View this message in context: <a rel="nofollow" target="_blank" href="http://osgeo-org.1803224.n2.nabble.com/Pedido-ilegal-ao-Geoserver-tp4962903p4963018.html">http://osgeo-org.1803224.n2.nabble.com/Pedido-ilegal-ao-Geoserver-tp4962903p4963018.html</a><br>
Sent from the OSGeo Portuguese Local Chapter mailing list archive at Nabble.com.<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Portugal mailing list<br>
<a rel="nofollow" ymailto="mailto:Portugal@lists.osgeo.org" target="_blank" href="/mc/compose?to=Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/portugal">http://lists.osgeo.org/mailman/listinfo/portugal</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>"Ajude um pouco ... já é muito"<br>Projecto SOSIndia <a rel="nofollow" target="_blank" href="http://sosindia.net">http://sosindia.net</a><br>---------------------------------------------<br>
<br>Shoot for the moon,<br>even if you miss it<br>you will land among the stars.<br>- Unknown<br><br>-------------------------------------------------<br><br>What if for a moment, as an experiment,<br>you drop every belief that you have?<br>
- Unknown<br><br>---------------------------------------------------------------<br><br>"We are all linked by a fabric of unseen connections. This fabric is constantly changing and evolving. This field is directly structured and influenced by our behavior and by our understanding."<br>
—David Bohm, quantum physicist, 1917–1992 <br>
</div><br>-----Anexo incorporado-----<br><br><div class="plainMail">_______________________________________________<br>Portugal mailing list<br><a ymailto="mailto:Portugal@lists.osgeo.org" href="/mc/compose?to=Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a><br></div></blockquote></td></tr></table><br>