Thanks a lot Anne. That solved the problem :)<br>Everything runs smoothly now.<br>Cheers,<br><br>Hugo<br><br><div class="gmail_quote">On Tue, May 31, 2011 at 3:39 PM, Anne Brookes <span dir="ltr">&lt;<a href="mailto:anne.brookes@jbaconsulting.co.uk">anne.brookes@jbaconsulting.co.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



<div link="#000000" vlink="#000000"><font size="2" face="arial">
<p><font size="2" face="Arial"><div><p class="MsoNormal"><span style="font-size: 10pt; color: black;">Hello Hugo,</span></p><p class="MsoNormal"><span style="font-size: 10pt; color: black;">I had the same problem and found that amending the proxy.cgi, where it handles the url= part of the querystring, solved the problem.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: black;">This is the new bit of the proxy.cgi:</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">method = os.environ[&#39;REQUEST_METHOD&#39;]</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">qs = os.environ[&#39;QUERY_STRING&#39;]</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">if (method == &#39;POST&#39;) or (method == &#39;PUT&#39;):</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    d = cgi.parse_qs(qs)</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    if d.has_key(&#39;url&#39;):</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">        url = d[&#39;url&#39;][0]</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    else:</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">        url = default_url</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">else:</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    #fs = cgi.FieldStorage()</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    #url = fs.getvalue(&#39;url&#39;, default_url) # get url to proxy to from request URL, or use default</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    <span style="color: red;">url = qs[4:]  #fetch from query string minus first &#39;url=&#39;</span></span><span style="font-size: 10pt; color: red;"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: black;"> </span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; color: black;">I have commented out the original </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">fs = cgi.FieldStorage()</span><span style="font-size: 10pt; color: black;"> and </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">url = fs.getvalue(&#39;url&#39;, default_url) </span><span style="font-size: 10pt;">lines and replaced with  </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">url = qs[4:]  </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">(</span><span style="font-size: 10pt;">and added </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: red;">qs = os.environ[&#39;QUERY_STRING&#39;]</span><span style="font-size: 10pt; color: red;"> </span><span style="font-size: 10pt;">at the top.  This seemed to be a more robust way of slicing the url string from the original querystring than getting it from the FieldStorage object.</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt;"> </span></p><p class="MsoNormal" style=""><span style="font-size: 10pt;">I hope this works for you too.</span></p><p class="MsoNormal"><span style="font-size: 10pt;">Cheers,</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: black;"> </span></p><p class="MsoNormal"><b><span style="font-size: 10pt; color: black;">Anne Brookes</span></b><span style="color: black;"></span></p><p class="MsoNormal">
<span style="font-size: 10pt; color: black;">Senior Analyst - GIS and System Development</span><span style="color: black;"></span></p><p class="MsoNormal"><span style="color: black;"> </span><span style="font-size: 10pt; color: black;"></span></p>
<br></div></font></p><font size="2">
<table style="border-bottom: 1px solid rgb(0, 0, 0); border-top: 1px solid rgb(0, 0, 0);" border="0" cellpadding="2" width="635">
<tbody>
<tr>
<td style="border-top: 0px none;" width="140"></td>
<td style="border-top: 0px none;" width="359"></td>
<td style="border-top: 0px none;" width="136"></td></tr>
<tr>
<td rowspan="8" align="middle" valign="top" width="140"><a href="http://www.jbaconsulting.co.uk/" target="_blank"><img src="" alt="JBA Consulting" border="0" width="136" height="127"></a></td>
<td width="359"><small><b><font face="Arial">JBA Consulting</font></b></small></td>
<td rowspan="5" align="middle" valign="top" width="136"><a href="http://www.jbaconsulting.co.uk/?q=nce-winner-2010" target="_blank"><img src="" alt="NCE Consultant of the Year 2010" border="0" width="132" height="73"></a></td>
</tr>
<tr>
<td width="359"><small><b><font face="Arial">South Barn</font></b></small></td></tr>
<tr>
<td width="359"><small><b><font face="Arial">Broughton Hall</font></b></small></td></tr>
<tr>
<td width="359"><small><b><font face="Arial">SKIPTON</font></b></small></td></tr>
<tr>
<td rowspan="2" width="359"><small><b><font face="Arial">North Yorkshire</font></b></small></td></tr>
<tr>
<td rowspan="3" align="middle" valign="bottom" width="136"><a href="http://twitter.com/JBAConsulting" target="_blank"><img src="" alt="Follow JBA Consulting on Twitter" border="0" width="85" height="37"></a><br><a href="http://twitter.com/JBAConsulting" target="_blank"><b><small><font face="Arial">@JBAConsulting</font></small></b></a></td>
</tr>
<tr>
<td width="359"><small><b><font face="Arial">BD23 3AE</font></b></small></td></tr>
<tr>
<td width="359"><small><b><font face="Arial">United Kingdom</font></b></small></td></tr>
<tr>
<td width="140"></td>
<td colspan="2" width="359"><small><b><font face="Arial">t: +44(0)1756 799919 | f: +44(0)1756 799449 </font></b></small></td></tr>
<tr>
<td colspan="3" width="635"></td></tr></tbody></table></font></font>
<table border="0" cellpadding="2" width="635">
<tbody>
<tr>
<td width="461"><b><font size="1" face="arial"><small>This email is covered by JBA Consulting&#39;s <a href="http://www.jbaconsulting.co.uk/?q=disclaimer" target="_blank">email disclaimer</a>.</small></font><font size="2" face="arial"><br>
</font><font color="#008000" size="2" face="arial"><small><small>JBA is a Carbon Neutral Company. <i>Please don&#39;t print this email unless you really need to. </i></small></small></font></b></td>
<td align="right" valign="bottom" width="162"><font color="#000000" size="2" face="arial"><small><b><a href="http://www.jbaconsulting.co.uk/" target="_blank">www.jbaconsulting.co.uk</a></b></small></font></td></tr></tbody></table>

<p><font size="2" face="arial"><p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:users-bounces@geoext.org" target="_blank">users-bounces@geoext.org</a> [mailto:<a href="mailto:users-bounces@geoext.org" target="_blank">users-bounces@geoext.org</a>] <b>On Behalf Of </b>Hugo<br>
<b>Sent:</b> 31 May 2011 15:12<br><b>To:</b> <a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a><br><b>Subject:</b> [Users] WMSCapabilitiesStore URL problem</span></p></font></p></div><div class="im"><p class="MsoNormal">
 </p><p class="MsoNormal">Hello all,<br><br>I&#39;m having troubles to populate the WMSCapabilitiesStore. I have the following code:<br><br>var wmsStore = new GeoExt.data.WMSCapabilitiesStore({<br>   url: &#39;<a href="http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1" target="_blank">http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1</a>&#39;,<br>
   autoLoad: true<br>});<br><br>The request is never shown in firebug. I know this might be related with the proxy definition but i&#39;m sure i have configured the openlayers proxy.cgi correctly once that i&#39;m able to correctly load WFS coming from this very same Geoserver. Also, when using the following address (directly on the browser) the response is returned correctly:<br>
<br><a href="http://localhost/cgi-bin/proxy.cgi?url=http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1" target="_blank">http://localhost/cgi-bin/proxy.cgi?url=http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1</a>&#39;<br>
<br>However if i try to use this url for the store i get the following error:</p><pre><code> &lt;ServiceException code=&quot;MissingParameterValue&quot; locator=&quot;request&quot;&gt;</code><br><code>      Could not determine geoserver request from http request org.apache.catalina.connector.RequestFacade</code><br>
<br><code></code></pre><pre> </pre><p class="MsoNormal">I think this is related with wrong parameter passing to the server because, if i check the request params in firebug i can see the following:</p><table border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td style="padding: 0cm;"><p class="MsoNormal">REQUEST</p></td><td style="padding: 0cm;"><p class="MsoNormal"><code><span style="font-size: 10pt;">GetCapabilities</span></code></p></td></tr><tr><td style="padding: 0cm;">
<p class="MsoNormal">VERSION</p></td><td style="padding: 0cm;"><p class="MsoNormal"><code><span style="font-size: 10pt;">1.1.1</span></code></p></td></tr><tr><td style="padding: 0cm;"><p class="MsoNormal">url</p></td><td style="padding: 0cm;">
<p class="MsoNormal"><code><span style="font-size: 10pt;"><a href="http://localhost:8080/geoserver/ows?SERVICE=WMS" target="_blank">http://localhost:8080/geoserver/ows?SERVICE=WMS</a></span></code></p></td></tr></tbody></table>
<p class="MsoNormal" style="margin-bottom: 12pt;"><br><br>I have also tried with the following code:<br><br>var wmsStore = new GeoExt.data.WMSCapabilitiesStore({<br>  proxy: new Ext.data.ScriptTagProxy({<br>      url: &#39;<a href="http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1" target="_blank">http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1</a>&#39;,<br>
   }),<br>   autoLoad: true<br>});<br><br>With this approach i get an error related to the reader (i suppose) like the following:</p><div><p class="MsoNormal"><span>missing ; before statement</span></p></div></div><div><p class="MsoNormal">
<span style="border: 1pt solid windowtext; padding: 0cm;"><img src="" alt="Image removed by sender." border="0" width="100" height="100"></span>&lt;!DOCTYPE WMT_MS_Capabilities SYSTEM &quot;...s/wms/1.1.1/WMS_MS_Capabilities.dtd&quot;&gt; </p>
</div><div><div></div><div class="h5"><p class="MsoNormal"><br>So, finally my question: what am i doing wrong here? Or do i need to configure something else?<br><br>Thanks in advance.<br>Kind regards,<br><br>Hugo<br clear="all">
<br>-- <br>Hugo Martins<br>LabNT - ISEGI UNL<br>Campus de Campolide<br>1070-312 Lisboa<br>N 38°43&#39;56.84&quot;, W 9°9&#39;35.74&quot;</p>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Hugo Martins<br>LabNT - ISEGI UNL<br>Campus de Campolide<br>1070-312 Lisboa<br>N 38°43&#39;56.84&quot;, W 9°9&#39;35.74&quot;<br>