Thanks a lot Anne. That solved the problem :) Everything runs smoothly now. Cheers,
Hugo On Tue, May 31, 2011 at 3:39 PM, Anne Brookes < [email protected]> wrote: > Hello Hugo, > > I had the same problem and found that amending the proxy.cgi, where it > handles the url= part of the querystring, solved the problem. > > This is the new bit of the proxy.cgi: > > method = os.environ['REQUEST_METHOD'] > > qs = os.environ['QUERY_STRING'] > > if (method == 'POST') or (method == 'PUT'): > > d = cgi.parse_qs(qs) > > if d.has_key('url'): > > url = d['url'][0] > > else: > > url = default_url > > else: > > #fs = cgi.FieldStorage() > > #url = fs.getvalue('url', default_url) # get url to proxy to from > request URL, or use default > > url = qs[4:] #fetch from query string minus first 'url=' > > > > I have commented out the original fs = cgi.FieldStorage() and url = > fs.getvalue('url', default_url) lines and replaced with url = qs[4:] (and > added qs = os.environ['QUERY_STRING'] 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. > > > > I hope this works for you too. > > Cheers, > > > > *Anne Brookes* > > Senior Analyst - GIS and System Development > > > > [image: JBA Consulting] <http://www.jbaconsulting.co.uk/> *JBA > Consulting* [image: NCE Consultant of the Year > 2010]<http://www.jbaconsulting.co.uk/?q=nce-winner-2010> > *South Barn* *Broughton Hall* *SKIPTON* *North Yorkshire* [image: Follow > JBA Consulting on Twitter] <http://twitter.com/JBAConsulting> > *@JBAConsulting* <http://twitter.com/JBAConsulting> *BD23 3AE* *United > Kingdom* *t: +44(0)1756 799919 | f: +44(0)1756 799449 * *This email is > covered by JBA Consulting's email > disclaimer<http://www.jbaconsulting.co.uk/?q=disclaimer> > . > JBA is a Carbon Neutral Company. Please don't print this email unless you > really need to. * *www.jbaconsulting.co.uk* > > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Hugo > *Sent:* 31 May 2011 15:12 > *To:* [email protected] > *Subject:* [Users] WMSCapabilitiesStore URL problem > > > > Hello all, > > I'm having troubles to populate the WMSCapabilitiesStore. I have the > following code: > > var wmsStore = new GeoExt.data.WMSCapabilitiesStore({ > url: ' > http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1 > ', > autoLoad: true > }); > > 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: > > > http://localhost/cgi-bin/proxy.cgi?url=http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1 > ' > > However if i try to use this url for the store i get the following error: > > <ServiceException code="MissingParameterValue" locator="request"> > Could not determine geoserver request from http request > org.apache.catalina.connector.RequestFacade > > > > 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: > > REQUEST > > GetCapabilities > > VERSION > > 1.1.1 > > url > > http://localhost:8080/geoserver/ows?SERVICE=WMS > > > > I have also tried with the following code: > > var wmsStore = new GeoExt.data.WMSCapabilitiesStore({ > proxy: new Ext.data.ScriptTagProxy({ > url: ' > http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1 > ', > }), > autoLoad: true > }); > > With this approach i get an error related to the reader (i suppose) like > the following: > > missing ; before statement > > [image: Image removed by sender.]<!DOCTYPE WMT_MS_Capabilities SYSTEM > "...s/wms/1.1.1/WMS_MS_Capabilities.dtd"> > > > So, finally my question: what am i doing wrong here? Or do i need to > configure something else? > > Thanks in advance. > Kind regards, > > Hugo > > -- > Hugo Martins > LabNT - ISEGI UNL > Campus de Campolide > 1070-312 Lisboa > N 38°43'56.84", W 9°9'35.74" > -- Hugo Martins LabNT - ISEGI UNL Campus de Campolide 1070-312 Lisboa N 38°43'56.84", W 9°9'35.74"
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
