Hi list,<div><br>this post is regarding the earlier post called &#39;WFS not loading&#39;, <div><br></div><div>I&#39;m going through the proxy setup, assuming the devil is in the detail.</div><div><br>I&#39;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: &quot;web.xml&quot;</li></ol><font class="Apple-style-span" color="#FF0000">&lt;servlet&gt;<br>       &lt;servlet-name&gt;cgi&lt;/servlet-name&gt;<br>       &lt;servlet-class&gt;org.apache.catalina.servlets.CGIServlet&lt;/servlet-class&gt;<br>
       &lt;init-param&gt;<br>         &lt;param-name&gt;debug&lt;/param-name&gt;<br>         &lt;param-value&gt;0&lt;/param-value&gt;<br>       &lt;/init-param&gt;<br>       &lt;init-param&gt;<br>         &lt;param-name&gt;cgiPathPrefix&lt;/param-name&gt;<br>
         &lt;param-value&gt;WEB-INF/cgi&lt;/param-value&gt;<br>       &lt;/init-param&gt;</font><br><font class="Apple-style-span" color="#FF0000">&lt;init-param&gt;<br> &lt;param-name&gt;executable&lt;/param-name&gt;<br>
         &lt;param-value&gt;c:\python26\python.exe&lt;/param-value&gt;<br>       &lt;/init-param&gt;<br>&lt;init-param&gt;<br>         &lt;param-name&gt;passShellEnvironment&lt;/param-name&gt;<br>         &lt;param-value&gt;true&lt;/param-value&gt;<br>
       &lt;/init-param&gt;<br>        &lt;load-on-startup&gt;5&lt;/load-on-startup&gt;<br>   &lt;/servlet&gt;</font><br>  <br>   &lt;!-- The mapping for the default servlet --&gt;<br>   <font class="Apple-style-span" color="#FF0000">&lt;servlet-mapping&gt;<br>
       &lt;servlet-name&gt;default&lt;/servlet-name&gt;<br>       &lt;url-pattern&gt;/&lt;/url-pattern&gt;<br>   &lt;/servlet-mapping&gt;</font><br>    <br>   &lt;!-- The mapping for the JSP servlet --&gt;<br>   <font class="Apple-style-span" color="#FF0000">&lt;servlet-mapping&gt;<br>
       &lt;servlet-name&gt;jsp&lt;/servlet-name&gt;<br>       &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;<br>   &lt;/servlet-mapping&gt;</font><br><br>   <font class="Apple-style-span" color="#FF0000">&lt;servlet-mapping&gt;<br>
       &lt;servlet-name&gt;jsp&lt;/servlet-name&gt;<br>       &lt;url-pattern&gt;*.jspx&lt;/url-pattern&gt;<br>   &lt;/servlet-mapping&gt; </font>   <br><br>   &lt;!-- The mapping for the CGI Gateway servlet --&gt;<br>   <font class="Apple-style-span" color="#FF0000">&lt;servlet-mapping&gt;<br>
       &lt;servlet-name&gt;cgi&lt;/servlet-name&gt;<br>       &lt;url-pattern&gt;/cgi-bin/*&lt;/url-pattern&gt;<br>   &lt;/servlet-mapping&gt;</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 = [&#39;localhost:8081&#39;, &#39;localhost&#39;] <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&#39;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 = &quot;WEB-INF/cgi/proxy.cgi?url=&quot;;<br><br>
Here I&#39;m a little confused: shouldn&#39;t be the location point to &quot;cgi-bin/proxy.cgi?url=&quot;; 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: &quot;true&quot;)<br>
<br>7.- Restarted Tomcat.<br><br>Now, the WFS doesn&#39;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 &lt;<a href="mailto:gaertner.p@gmail.com">gaertner.p@gmail.com</a>&gt; wrote:<br>&gt;<br>&gt; Hi list, <br>&gt;<br>&gt; I&#39;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 &quot;Leveraging OGC Services with GeoExt.<br>
&gt; I have WFS service on a ArcGIS Server, and set all necessary parameter including the proxi.cgi but the attribute don&#39;t show up.<br>&gt; Here is the code:<br>&gt;<br>&gt; 25 Ext.onReady(function() {<br>&gt; 26 OpenLayers.ProxyHost=&quot;proxy.cgi?url=&quot;;<br>
&gt; 27<br>&gt; 28 var layer = new OpenLayers.Layer.Vector(&quot;vector&quot;, {<br>&gt; 29 strategies: [new OpenLayers.Strategy.Fixed()],<br>&gt; 30 protocol: new OpenLayers.Protocol.WFS({<br>&gt; 31 url: &quot;<a href="http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer">http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer</a>&quot;,<br>
&gt; 32 version: &quot;1.1.0&quot;,<br>&gt; 33 featureType: &quot;SoilDatabase_wgs84&quot;,<br>&gt; 34 featureNS: &quot;<a href="http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer">http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer</a>&quot;,<br>
&gt; 35 featurePrefix : &quot;soil_wfs&quot;,<br>&gt; 36 geometryName: &quot;Shape&quot;,<br>&gt; 37 srsName: &quot;EPSG:4326&quot;<br>&gt; 38 })<br>&gt; 39 });<br>&gt; 40<br>&gt; 41 var store = new GeoExt.data.FeatureStore({<br>
&gt; 42 fields: [<br>&gt; 43 {name: &quot;SiteCode&quot;, type: &quot;string&quot;}<br>&gt; 44 ],<br>&gt; 45 layer: layer<br>&gt; 46 });<br>&gt; 47<br>&gt; 48 var map = new OpenLayers.Map({allOverlays: true});<br>&gt; 49<br>
&gt; 50 var mapPanel = new GeoExt.MapPanel({<br>&gt; 51 title: &quot;Map&quot;,<br>&gt; 52 region: &quot;west&quot;,<br>&gt; 53 width: 400,<br>&gt; 54 map: map,<br>&gt; 55 layers: [layer],<br>&gt; 56 extent: new OpenLayers.Bounds(148,-28,150,-30)<br>
&gt; 57 });<br>&gt; 58<br>&gt; 59 var gridPanel = new Ext.grid.GridPanel({<br>&gt; 60 title: &quot;Feature Table&quot;,<br>&gt; 61 region: &quot;center&quot;,<br>&gt; 62 viewConfig: {forceFit: true},<br>&gt; 63 store: store,<br>
&gt; 64 sm: new GeoExt.grid.FeatureSelectionModel(),<br>&gt; 65 cm: new Ext.grid.ColumnModel({<br>&gt; 66 defaults: {<br>&gt; 67 sortable: true<br>&gt; 68 },<br>&gt; 69 columns: [<br>&gt; 70 {header: &quot;SiteCode&quot;, dataIndex: &quot;SiteCode&quot;}<br>
&gt; 71 ]<br>&gt; 72 })<br>&gt; 73 });<br>&gt; 74<br>&gt; 75 var mainPanel = new Ext.Panel({<br>&gt; 76 renderTo: document.body,<br>&gt; 77 layout: &quot;border&quot;,<br>&gt; 78 height: 450,<br>&gt; 79 width: 800,<br>&gt; 80 items: [gridPanel, mapPanel]<br>
&gt; 81 });<br>&gt; 82 }); <br>&gt; ............ etc<br>&gt;<br>&gt; Firebug:<br>&gt; - the POST has a &#39;200 OK&#39; message.<br>&gt;<br>&gt; Post Source is:<br>&gt;<br>&gt; &lt;wfs:GetFeature xmlns:wfs=&quot;<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>&quot; service=&quot;WFS&quot; version=&quot;1.1.0&quot; xsi:schemaLocation=&quot;<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>&quot; xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;&gt;&lt;wfs:Query typeName=&quot;soil_wfs:SoilDatabase_wgs84&quot; srsName=&quot;EPSG:4326&quot; xmlns:soil_wfs=&quot;<a href="http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer">http://greenway:8399/arcgis/services/SFAFNR00/soil_wfs/GeoDataServer/WFSServer</a>&quot;/&gt;&lt;/wfs:GetFeature&gt;<br>
&gt;<br>&gt; XML:<br>&gt;<br>&gt; XML Parsing Error: mismatched tag. Expected: &lt;/div&gt;. Location: moz-nullprincipal:{3ce0d8b7-302f-4b79-a5fc-bc67887b8251} Line Number 56, Column 7:<br>&gt;<br>&gt;    &lt;/p&gt;<br>&gt; ------^<br>
&gt;<br>&gt; I also get the following in Firebug:<br>&gt; mismatched tag. Expected: &lt;/div&gt;.<br>&gt;  &lt;/p&gt; (that points to line 55)<br>&gt;<br>&gt;<br>&gt; I don&#39;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>
&gt; The browser based WFS - GetCapabilities, DescribeFeatureTypeand GetFeature work perfectly fine. <br>&gt; Any help or suggestion is more than welcome.<br>&gt; Regards, Philipp<br></div></div></div></div></div>