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"><<a href="mailto:anne.brookes@jbaconsulting.co.uk">anne.brookes@jbaconsulting.co.uk</a>></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: "Courier New";">method = os.environ['REQUEST_METHOD']</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New"; color: red;">qs = os.environ['QUERY_STRING']</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">if (method == 'POST') or (method == 'PUT'):</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> d = cgi.parse_qs(qs)</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> if d.has_key('url'):</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> url = d['url'][0]</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> else:</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> url = default_url</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";">else:</span></p>
<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> #fs = cgi.FieldStorage()</span></p><p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: "Courier New";"> #url = fs.getvalue('url', 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: "Courier New";"> <span style="color: red;">url = qs[4:] #fetch from query string minus first 'url='</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: "Courier New";">fs = cgi.FieldStorage()</span><span style="font-size: 10pt; color: black;"> and </span><span style="font-size: 10pt; font-family: "Courier New";">url = fs.getvalue('url', default_url) </span><span style="font-size: 10pt;">lines and replaced with </span><span style="font-size: 10pt; font-family: "Courier New"; color: red;">url = qs[4:] </span><span style="font-size: 10pt; font-family: "Courier New";">(</span><span style="font-size: 10pt;">and added </span><span style="font-size: 10pt; font-family: "Courier New"; color: red;">qs = os.environ['QUERY_STRING']</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'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'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'm having troubles to populate the WMSCapabilitiesStore. I have the following code:<br><br>var wmsStore = new GeoExt.data.WMSCapabilitiesStore({<br> url: '<a href="http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1" target="_blank">http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1</a>',<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'm sure i have configured the openlayers proxy.cgi correctly once that i'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&REQUEST=GetCapabilities&VERSION=1.1.1" target="_blank">http://localhost/cgi-bin/proxy.cgi?url=http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1</a>'<br>
<br>However if i try to use this url for the store i get the following error:</p><pre><code> <ServiceException code="MissingParameterValue" locator="request"></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: '<a href="http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1" target="_blank">http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1</a>',<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><!DOCTYPE WMT_MS_Capabilities SYSTEM "...s/wms/1.1.1/WMS_MS_Capabilities.dtd"> </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'56.84", W 9°9'35.74"</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'56.84", W 9°9'35.74"<br>