So when you have a proxy, you also need to use it for the url in your
Protocol.HTTP configuration. And not http://localhost:8080.

Andreas.

On Wed, Jun 27, 2012 at 12:57 PM,  <jcort...@dipalme.org> wrote:
> Thank very much for yoyr help,
>
> I put  a proxy that makes my wfs available at a url relative to my
> application, but
> the problem is that when I  try to load the attribute store gives me the
> following error
> :
> "Error reading XML: location element not found: moz-nullprincipal:
> {3d64a956-5d9c-465e-87c0-1cae90cac057} number of line 1, column 1:"
>
> And therefore I can not get the name of fields
>
> My code is as follows:
>
>
>
> function setLayer(model, node) {
>
>                 if(!(node && node.layer instanceof OpenLayers.Layer.WMS)) {
>                         return;
>                 }
>                 selectedLayer = null;
>                 vectorLayer.removeAllFeatures();
>                 app.featureGrid.reconfigure( new Ext.data.Store(),new
> Ext.grid.ColumnModel([]) );
>         var layer = node.layer;
>                 var url = layer.url.split("?")[0];
>                 alert("capa seleccionada: " + layer.params.LAYERS);
>                 schema = new GeoExt.data.AttributeStore({
>                    proxy: new GeoExt.data.ProtocolProxy({
>                  protocol: new OpenLayers.Protocol.HTTP({
>                                         url:
> "http://localhost:8080/geoserver/visor/wms?SERVICE=WFS&REQUEST=DescribeFeatureType&VERSION=1.1.0&TYPENAME=";
> + layer.params.LAYERS ,
>
>
>                                         // autoLoad: true,
>                                          listeners: {
>                                                                 load :
> function(store, records, index) {
>
> alert ("load");
>
>             app.featureGrid.setTitle(layer.name);
>
>             selectedLayer = layer;
>
>             configureGrid(store, url);
>
>                                }
>                                                            }  //listeners
>                  })
>                        })
>
>                 });         // final de schema
>                 schema.load();
>     };
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Best regards,
> José Carlos
>
>
>
> De:        Andreas Hocevar <ahoce...@opengeo.org>
> Para:        jcort...@dipalme.org
> cc:        users@geoext.org
> Fecha:        27/06/2012 10:46
> Asunto:        Re: [Users] Do not work me the DescribeFeatureType query to
> create a Attribute Store
> Enviado por:        andreas.hoce...@gmail.com
>
> ________________________________
>
>
>
> Are you using a GeoServer url different than '/geoserver/ows' or
> '/geoserver/wfs', like e.g. 'http://myhost:8080/geoserver/wfs'? If so,
> then your request will be blocked by the browser's Same Origin Policy.
> In this case you will need a proxy that makes your wfs available at a
> url relative to your application.
>
> Andreas.
>
> On Wed, Jun 27, 2012 at 10:36 AM,  <jcort...@dipalme.org> wrote:
>> Hi all,
>>
>> I'm following the tutorial “Developing OGC Compliant Web Applications with
>> Geoext” and I have some problem with the second lesson 3.1 “ Creating a
>> Synchronized Grid and Map View of WFS Features”
>> http://workshops.opengeo.org/geoext/wfs/grid.html.
>>
>> I'm trying to create a gridpanel in Geoext, that must be filled with the
>> names of the fields from an AttributeStore and then create their own
>> FeatureStore with the values of these fields and update the grid panel.
>>
>> The problem is that when I select a layer and execute the funcion setLayer
>> that create the attribute sotore (schema),   no execute never the listener
>> load and therefore I can not get the name of fields
>>
>> My code is as follows:
>>
>>
>> function setLayer(model, node) {
>>
>>                 if(!(node && node.layer instanceof OpenLayers.Layer.WMS))
>> {
>>                         return;
>>                 }
>>                 selectedLayer = null;
>>                 vectorLayer.removeAllFeatures();
>>                 app.featureGrid.reconfigure( new Ext.data.Store(),new
>> Ext.grid.ColumnModel([]) );
>>         var layer = node.layer;
>>                 var url = layer.url.split("?")[0];
>>                 alert("capa seleccionada: " + layer.params.LAYERS);
>>                 schema = new GeoExt.data.AttributeStore({
>>
>>                                         url: url,
>>                                                 baseParams: {
>>
>>     "SERVICE": "WFS",
>>
>>     "REQUEST": "DescribeFeatureType",
>>
>>     "VERSION": "1.1.0",
>>
>>     "TYPENAME": layer.params.LAYERS
>>                                                 },
>>
>>                                          autoLoad: true,
>>                                          listeners: {
>>                                                                 load :
>> function(store, records, index) {
>>
>> alert ("load");
>>
>>             app.featureGrid.setTitle(layer.name);
>>
>>             selectedLayer = layer;
>>
>>             configureGrid(store, url);
>>
>>                                }
>>                                                            }  //listeners
>>
>>                 });         // final de schema
>>     }
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users@geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to