Hi list,<div><br>this post is regarding the earlier post called 'WFS not loading', <div><br></div><div>I'm going through the proxy setup, assuming the devil is in the detail.</div><div><br>I'm working with windows and Tomcat 6.<div>
<br>followed the example from Juan to set the proxy - <a href="http://www.mail-archive.com/users@openlayers.org/msg11290.html">http://www.mail-archive.com/users@openlayers.org/msg11290.html</a> (he had Tomcat 5) .<br><br>
<ol><li>I modified the file: "web.xml"</li></ol><font class="Apple-style-span" color="#FF0000"><servlet><br> <servlet-name>cgi</servlet-name><br> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class><br>
<init-param><br> <param-name>debug</param-name><br> <param-value>0</param-value><br> </init-param><br> <init-param><br> <param-name>cgiPathPrefix</param-name><br>
<param-value>WEB-INF/cgi</param-value><br> </init-param></font><br><font class="Apple-style-span" color="#FF0000"><init-param><br> <param-name>executable</param-name><br>
<param-value>c:\python26\python.exe</param-value><br> </init-param><br><init-param><br> <param-name>passShellEnvironment</param-name><br> <param-value>true</param-value><br>
</init-param><br> <load-on-startup>5</load-on-startup><br> </servlet></font><br> <br> <!-- The mapping for the default servlet --><br> <font class="Apple-style-span" color="#FF0000"><servlet-mapping><br>
<servlet-name>default</servlet-name><br> <url-pattern>/</url-pattern><br> </servlet-mapping></font><br> <br> <!-- The mapping for the JSP servlet --><br> <font class="Apple-style-span" color="#FF0000"><servlet-mapping><br>
<servlet-name>jsp</servlet-name><br> <url-pattern>*.jsp</url-pattern><br> </servlet-mapping></font><br><br> <font class="Apple-style-span" color="#FF0000"><servlet-mapping><br>
<servlet-name>jsp</servlet-name><br> <url-pattern>*.jspx</url-pattern><br> </servlet-mapping> </font> <br><br> <!-- The mapping for the CGI Gateway servlet --><br> <font class="Apple-style-span" color="#FF0000"><servlet-mapping><br>
<servlet-name>cgi</servlet-name><br> <url-pattern>/cgi-bin/*</url-pattern><br> </servlet-mapping></font><div><font class="Apple-style-span" color="#FF0000"><br></font><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
2. I Did not rename the servlets-cgi.renametojar since in Tomcat 6 it is not necessary.<br><br>3. copied the proxy.cgi from the openlayers website to: C:\apache-tomcat-6.0.13\webapps\ROOT\FAFNR\WEB-INF\cgi\proxy.cgi<br><br>
4a. in the proxy file I included my machine: <span class="Apple-style-span" style="font-family: monospace; font-size: medium; white-space: pre; ">allowedHosts = ['localhost:8081', 'localhost'] <br><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal; font-size: small;">4b.</span></font> <font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal; font-size: small; ">changed</span></font> <span class="Apple-style-span" style="white-space: normal; font-size: 11px; ">#!/usr/bin/env python to <span class="Apple-style-span" style="font-size: medium; white-space: pre; ">#C:/Python25/python.exe (I read somewhere that's correct for windows user)<span class="Apple-style-span" style="white-space: normal; font-size: 11px; ">!</span></span></span></span></blockquote>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><br></div>5. in my map file I set the proxy: OpenLayers.ProxyHost = "WEB-INF/cgi/proxy.cgi?url=";<br><br>
Here I'm a little confused: shouldn't be the location point to "cgi-bin/proxy.cgi?url="; because of the setting in the web.xml file?<br><br>6. included in the client folder the context.xml file: C:\apache-tomcat-6.0.13\webapps\ROOT\META-INF\context.xml (privileged is set to: "true")<br>
<br>7.- Restarted Tomcat.<br><br>Now, the WFS doesn't load.<br><br><b>In Firebug:</b><br><br>The Firebug response to the proxy call is the content of the proxy.cgi !!<br><br>as well as an error regarding python<br><br>
<span class="objectBox objectBox-errorMessage hasBreakSwitch "><div class="errorTitle focusRow subLogRow "><font class="Apple-style-span" color="#FF0000">not well-formed</font></div><div class="errorTrace "></div><div class="errorSourceBox errorSource-syntax focusRow subLogRow ">
<a class="errorSource a11yFocus "><font class="Apple-style-span" color="#FF0000">#C:/Python25/python.exe</font></a></div></span><br>where did I miss something? is it the location of the proxy.cgi or is the issue related to python. <br>
<br>Regards, Philipp<br><br><br></blockquote><div><br>On 11 March 2010 10:55, Philipp Gaertner <<a href="mailto:gaertner.p@gmail.com">gaertner.p@gmail.com</a>> wrote:<br>><br>> Hi list, <br>><br>> 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.<br>
> I have WFS service on a ArcGIS Server, and set all necessary parameter including the proxi.cgi but the attribute don't show up.<br>> Here is the code:<br>><br>> 25 Ext.onReady(function() {<br>> 26 OpenLayers.ProxyHost="proxy.cgi?url=";<br>
> 27<br>> 28 var layer = new OpenLayers.Layer.Vector("vector", {<br>> 29 strategies: [new OpenLayers.Strategy.Fixed()],<br>> 30 protocol: new OpenLayers.Protocol.WFS({<br>> 31 url: "<a href="http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer">http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer</a>",<br>
> 32 version: "1.1.0",<br>> 33 featureType: "SoilDatabase_wgs84",<br>> 34 featureNS: "<a href="http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer">http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer</a>",<br>
> 35 featurePrefix : "soil_wfs",<br>> 36 geometryName: "Shape",<br>> 37 srsName: "EPSG:4326"<br>> 38 })<br>> 39 });<br>> 40<br>> 41 var store = new GeoExt.data.FeatureStore({<br>
> 42 fields: [<br>> 43 {name: "SiteCode", type: "string"}<br>> 44 ],<br>> 45 layer: layer<br>> 46 });<br>> 47<br>> 48 var map = new OpenLayers.Map({allOverlays: true});<br>> 49<br>
> 50 var mapPanel = new GeoExt.MapPanel({<br>> 51 title: "Map",<br>> 52 region: "west",<br>> 53 width: 400,<br>> 54 map: map,<br>> 55 layers: [layer],<br>> 56 extent: new OpenLayers.Bounds(148,-28,150,-30)<br>
> 57 });<br>> 58<br>> 59 var gridPanel = new Ext.grid.GridPanel({<br>> 60 title: "Feature Table",<br>> 61 region: "center",<br>> 62 viewConfig: {forceFit: true},<br>> 63 store: store,<br>
> 64 sm: new GeoExt.grid.FeatureSelectionModel(),<br>> 65 cm: new Ext.grid.ColumnModel({<br>> 66 defaults: {<br>> 67 sortable: true<br>> 68 },<br>> 69 columns: [<br>> 70 {header: "SiteCode", dataIndex: "SiteCode"}<br>
> 71 ]<br>> 72 })<br>> 73 });<br>> 74<br>> 75 var mainPanel = new Ext.Panel({<br>> 76 renderTo: document.body,<br>> 77 layout: "border",<br>> 78 height: 450,<br>> 79 width: 800,<br>> 80 items: [gridPanel, mapPanel]<br>
> 81 });<br>> 82 }); <br>> ............ etc<br>><br>> Firebug:<br>> - the POST has a '200 OK' message.<br>><br>> Post Source is:<br>><br>> <wfs:GetFeature xmlns:wfs="<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>" service="WFS" version="1.1.0" xsi:schemaLocation="<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>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"><wfs:Query typeName="soil_wfs:SoilDatabase_wgs84" srsName="EPSG:4326" xmlns:soil_wfs="<a href="http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer">http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer</a>"/></wfs:GetFeature><br>
><br>> XML:<br>><br>> XML Parsing Error: mismatched tag. Expected: </div>. Location: moz-nullprincipal:{3ce0d8b7-302f-4b79-a5fc-bc67887b8251} Line Number 56, Column 7:<br>><br>> </p><br>> ------^<br>
><br>> I also get the following in Firebug:<br>> mismatched tag. Expected: </div>.<br>> </p> (that points to line 55)<br>><br>><br>> I don't know where to go from here. I guess there is something wrong with my proxy settings. But <a href="http://localhost:8081/FAFNR/proxy.cgi">http://localhost:8081/FAFNR/proxy.cgi</a> point to the openlayers site. <br>
> The browser based WFS - GetCapabilities, DescribeFeatureTypeand GetFeature work perfectly fine. <br>> Any help or suggestion is more than welcome.<br>> Regards, Philipp<br></div></div></div></div></div>