<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word"><head><META content="text/html; charset=utf-8" http-equiv="Content-Type">

<TITLE>JBA Consulting TAD</TITLE>

<META CONTENT="Microsoft FrontPage 3.0" NAME="GENERATOR"><meta content="text/html; charset=utf-8" http-equiv=Content-Type><meta content="Microsoft Word 12 (filtered medium)" name=Generator><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.errormessage
        {mso-style-name:errormessage;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><BODY LINK="#000000" VLINK="#000000"><FONT FACE="arial" SIZE="2">
<P CLASS="a1f088e2-e042-47ea-950d-c602763f9319"><FONT FACE="Arial" SIZE="2"><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Hello Hugo,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>This is the new bit of the proxy.cgi:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>method = os.environ['REQUEST_METHOD']<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:red'>qs = os.environ['QUERY_STRING']<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>if (method == 'POST') or (method == 'PUT'):<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; d = cgi.parse_qs(qs)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; if d.has_key('url'):<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url = d['url'][0]<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; else:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url = default_url<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>else:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; #fs = cgi.FieldStorage()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; #url = fs.getvalue('url', default_url) # get url to proxy to from request URL, or use default<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <span style='color:red'>url = qs[4:]&nbsp; #fetch from query string minus first 'url='</span></span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:red'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>I have commented out the original </span><span style='font-size:10.0pt;font-family:"Courier New"'>fs = cgi.FieldStorage()</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'> and </span><span style='font-size:10.0pt;font-family:"Courier New"'>url = fs.getvalue('url', default_url) </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>lines and replaced with&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>url = qs[4:]&nbsp; </span><span style='font-size:10.0pt;font-family:"Courier New"'>(</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>and added </span><span style='font-size:10.0pt;font-family:"Courier New";color:red'>qs = os.environ['QUERY_STRING']</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:red'> </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>at the top.&nbsp; This seemed to be a more robust way of slicing the url string from the original querystring than getting it from the FieldStorage object.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I hope this works for you too.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Anne Brookes</span></b><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Senior Analyst - GIS and System Development</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black'>&nbsp;</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'><o:p></o:p></span></p><BR></FONT></P><FONT SIZE="2">
<TABLE BORDER="0" CELLPADDING="2" STYLE="BORDER-BOTTOM: rgb(0,0,0) 1px solid; BORDER-TOP: rgb(0,0,0) 1px solid" WIDTH="635">
<TBODY>
<TR>
<TD STYLE="BORDER-TOP: 0px" WIDTH="140"></TD>
<TD STYLE="BORDER-TOP: 0px" WIDTH="359"></TD>
<TD STYLE="BORDER-TOP: 0px" WIDTH="136"></TD></TR>
<TR>
<TD ALIGN="middle" ROWSPAN="8" VALIGN="top" WIDTH="140"><A HREF="http://www.jbaconsulting.co.uk/"><IMG ALT="JBA Consulting" BORDER="0" HEIGHT="127" SRC="cid:imageadb90f.gif@c9e7e7ac.c5c14be6" WIDTH="136"></A></TD>
<TD WIDTH="359"><SMALL><STRONG><FONT FACE="Arial">JBA Consulting</FONT></STRONG></SMALL></TD>
<TD ALIGN="middle" ROWSPAN="5" VALIGN="top" WIDTH="136"><A HREF="http://www.jbaconsulting.co.uk/?q=nce-winner-2010"><IMG ALT="NCE Consultant of the Year 2010" BORDER="0" HEIGHT="73" SRC="cid:imagebeae49.gif@32c2088a.b17c4bc8" WIDTH="132"></A></TD></TR>
<TR>
<TD WIDTH="359"><SMALL><STRONG><FONT FACE="Arial">South Barn</FONT></STRONG></SMALL></TD></TR>
<TR>
<TD WIDTH="359"><SMALL><STRONG><FONT FACE="Arial">Broughton Hall</FONT></STRONG></SMALL></TD></TR>
<TR>
<TD WIDTH="359"><SMALL><STRONG><FONT FACE="Arial">SKIPTON</FONT></STRONG></SMALL></TD></TR>
<TR>
<TD ROWSPAN="2" WIDTH="359"><SMALL><STRONG><FONT FACE="Arial">North Yorkshire</FONT></STRONG></SMALL></TD></TR>
<TR>
<TD ALIGN="middle" ROWSPAN="3" VALIGN="bottom" WIDTH="136"><A HREF="http://twitter.com/JBAConsulting"><IMG ALT="Follow JBA Consulting on Twitter" BORDER="0" HEIGHT="37" SRC="cid:image81c06d.gif@c7db0d08.f5ab4072" WIDTH="85"></A><BR><A HREF="http://twitter.com/JBAConsulting"><STRONG><SMALL><FONT FACE="Arial">@JBAConsulting</FONT></SMALL></STRONG></A></TD></TR>
<TR>
<TD WIDTH="359"><SMALL><STRONG><FONT FACE="Arial">BD23 3AE</FONT></STRONG></SMALL></TD></TR>
<TR>
<TD WIDTH="359"><SMALL><STRONG><FONT FACE="Arial">United Kingdom</FONT></STRONG></SMALL></TD></TR>
<TR>
<TD WIDTH="140"></TD>
<TD COLSPAN="2" WIDTH="359"><SMALL><STRONG><FONT FACE="Arial">t: +44(0)1756 799919 | f: +44(0)1756 799449 </FONT></STRONG></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"><STRONG><FONT FACE="arial" SIZE="1"><SMALL>This email is covered by JBA Consulting's <A HREF="http://www.jbaconsulting.co.uk/?q=disclaimer">email disclaimer</A>.</SMALL></FONT><FONT FACE="arial" SIZE="2"><BR></FONT><FONT COLOR="#008000" FACE="arial" SIZE="2"><SMALL><SMALL>JBA is a Carbon Neutral Company. <EM>Please don't print this email unless you really need to. </EM></SMALL></SMALL></FONT></STRONG></TD>
<TD ALIGN="right" VALIGN="bottom" WIDTH="162"><FONT COLOR="#000000" FACE="arial" SIZE="2"><SMALL><STRONG><A HREF="http://www.jbaconsulting.co.uk/">www.jbaconsulting.co.uk</A></STRONG></SMALL></FONT></TD></TR></TBODY></TABLE>
<P><FONT FACE="arial" SIZE="2"><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> users-bounces@geoext.org [mailto:users-bounces@geoext.org] <b>On Behalf Of </b>Hugo<br><b>Sent:</b> 31 May 2011 15:12<br><b>To:</b> users@geoext.org<br><b>Subject:</b> [Users] WMSCapabilitiesStore URL problem<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></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>&nbsp;&nbsp; url: '<a href="http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1">http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1</a>',<br>&nbsp;&nbsp; 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&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1">http://localhost/cgi-bin/proxy.cgi?url=http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1</a>'<br><br>However if i try to use this url for the store i get the following error:<o:p></o:p></p><pre><code> &lt;ServiceException code=&quot;MissingParameterValue&quot; locator=&quot;request&quot;&gt;</code><br><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Could not determine geoserver request from http request org.apache.catalina.connector.RequestFacade</code><br><br><code><o:p></o:p></code></pre><pre><o:p>&nbsp;</o:p></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:<o:p></o:p></p><table border=0 cellpadding=0 cellspacing=0 class=MsoNormalTable><tr><td style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal>REQUEST<o:p></o:p></p></td><td style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><code><span style='font-size:10.0pt'>GetCapabilities</span></code><o:p></o:p></p></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal>VERSION<o:p></o:p></p></td><td style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><code><span style='font-size:10.0pt'>1.1.1</span></code><o:p></o:p></p></td></tr><tr><td style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal>url<o:p></o:p></p></td><td style='padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><code><span style='font-size:10.0pt'><a href="http://localhost:8080/geoserver/ows?SERVICE=WMS">http://localhost:8080/geoserver/ows?SERVICE=WMS</a></span></code><o:p></o:p></p></td></tr></table><p class=MsoNormal style='margin-bottom:12.0pt'><br><br>I have also tried with the following code:<br><br>var wmsStore = new GeoExt.data.WMSCapabilitiesStore({<br>&nbsp; proxy: new Ext.data.ScriptTagProxy({<br>&nbsp;&nbsp;&nbsp; &nbsp; url: '<a href="http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1">http://localhost:8080/geoserver/ows?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1</a>',<br>&nbsp;&nbsp; }),<br>&nbsp;&nbsp; autoLoad: true<br>});<br><br>With this approach i get an error related to the reader (i suppose) like the following:<o:p></o:p></p><div><p class=MsoNormal><span class=errormessage>missing ; before statement</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='border:solid windowtext 1.0pt;padding:0cm'><img alt="Image removed by sender." border=0 height=100 id="_x0000_i1025" src="cid:~WRD000.jpg" width=100></span>&lt;!DOCTYPE WMT_MS_Capabilities SYSTEM &quot;...s/wms/1.1.1/WMS_MS_Capabilities.dtd&quot;&gt; <o:p></o:p></p></div><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&quot;, W 9°9'35.74&quot;<o:p></o:p></p></div></FONT></P></BODY></HTML>