[Users] WFS not loading
Marc Jansen
jansen at terrestris.de
Thu Mar 11 20:51:24 CET 2010
Hi Philipp,
is there any chance we can see the response of the WFS-Server that gets
returned by your proxy? Have you edited the allowed hosts within the
proxy.cgi script? When you say that the "browser based" requests work,
you mean those you directly entered into your browsers navigation-bar,
right? Are you asking the services there through the proxy as well?
Regards,
Marc
Philipp Gaertner schrieb:
> Hi list,
>
> I'm using ExtJS, OpenLayers and GeoExt and try to create
> a synchronised map and table view of vector features and follow
> basically the tutorial from OpenGeo "Leveraging OGC Services with GeoExt.
> I have WFS service on a ArcGIS Server, and set all necessary parameter
> including the proxi.cgi but the attribute don't show up.
> Here is the code:
>
> 25 Ext.onReady(function() {
> 26 OpenLayers.ProxyHost="proxy.cgi?url=";
> 27
> 28 var layer = new OpenLayers.Layer.Vector("vector", {
> 29 strategies: [new OpenLayers.Strategy.Fixed()],
> 30 protocol: new OpenLayers.Protocol.WFS({
> 31 url:
> "http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer",
> 32 version: "1.1.0",
> 33 featureType: "SoilDatabase_wgs84",
> 34 featureNS:
> "http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer",
> 35 featurePrefix : "soil_wfs",
> 36 geometryName: "Shape",
> 37 srsName: "EPSG:4326"
> 38 })
> 39 });
> 40
> 41 var store = new GeoExt.data.FeatureStore({
> 42 fields: [
> 43 {name: "SiteCode", type: "string"}
> 44 ],
> 45 layer: layer
> 46 });
> 47
> 48 var map = new OpenLayers.Map({allOverlays: true});
> 49
> 50 var mapPanel = new GeoExt.MapPanel({
> 51 title: "Map",
> 52 region: "west",
> 53 width: 400,
> 54 map: map,
> 55 layers: [layer],
> 56 extent: new OpenLayers.Bounds(148,-28,150,-30)
> 57 });
> 58
> 59 var gridPanel = new Ext.grid.GridPanel({
> 60 title: "Feature Table",
> 61 region: "center",
> 62 viewConfig: {forceFit: true},
> 63 store: store,
> 64 sm: new GeoExt.grid.FeatureSelectionModel(),
> 65 cm: new Ext.grid.ColumnModel({
> 66 defaults: {
> 67 sortable: true
> 68 },
> 69 columns: [
> 70 {header: "SiteCode", dataIndex: "SiteCode"}
> 71 ]
> 72 })
> 73 });
> 74
> 75 var mainPanel = new Ext.Panel({
> 76 renderTo: document.body,
> 77 layout: "border",
> 78 height: 450,
> 79 width: 800,
> 80 items: [gridPanel, mapPanel]
> 81 });
> 82 });
>
> ............ etc
>
> Firebug:
> - the POST has a '200 OK' message.
>
> Post Source is:
>
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
> version="1.1.0"
> xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query
> typeName="soil_wfs:SoilDatabase_wgs84" srsName="EPSG:4326"
> xmlns:soil_wfs="http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer"/></wfs:GetFeature>
>
> XML:
>
> XML Parsing Error: mismatched tag. Expected: </div>. Location:
> moz-nullprincipal:{3ce0d8b7-302f-4b79-a5fc-bc67887b8251} Line Number
> 56, Column 7:
>
> </p>
> ------^
>
>
> I also get the following in Firebug:
>
> mismatched tag. Expected: </div>.
> </p> (*that points to line 55)*
>
>
>
> I don't know where to go from here. I guess there is something wrong
> with my proxy settings.
> But http://localhost:8081/FAFNR/proxy.cgi point to the openlayers site.
> The browser based WFS - GetCapabilities, DescribeFeatureTypeand
> GetFeature work perfectly fine.
> Any help or suggestion is more than welcome.
>
> Regards, Philipp
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list