<div>In case anyone is looking for this you do it the following way in tilecache.</div>
<div> </div>
<div> def fetch (self):<br> response = None<br> while response is None:<br> try:<br> <br> auth_handler = urllib2.HTTPBasicAuthHandler()<br> auth_handler.add_password("WMS",
self.url(), "username", "password")<br> opener = urllib2.build_opener(auth_handler)<br> response = opener.open(self.url())<br> data = response.read()<br> msg =
response.info()<br><br>Linda Rawson<br> </div>
<div><span class="gmail_quote">On 10/15/07, <b class="gmail_sendername">Linda Rawson</b> <<a href="mailto:linda.rawson@gmail.com">linda.rawson@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>I should have been more specific. I am very familiar with WMS. Thanks for the info!</div>
<div> </div>
<div>I just needed to send a <strong>username:password@</strong> to the service and that is where it is coughing and puking but only in IE. I think with tilecache I will need to adjust the proxy parameters in the cache.py
but I was wondering if anyone else got around this problem. You seemed to be a pretty good expert on proxy so I emailed you.</div>
<div> </div>
<div>Thanks!</div><span class="sg">
<div>Linda Rawson<br><br> </div></span>
<div><span class="e" id="q_115a57adc468ebbb_2">
<div><span class="gmail_quote">On 10/15/07, <b class="gmail_sendername">Jeff Dege</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:jdege@korterra.com" target="_blank">jdege@korterra.com</a>> wrote:
</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">(You sent this just to me, instead of to the list. I'm CC'ing it to the<br>list).<br><br>First, I'm by no means the expert on this stuff. But I'll give it a
<br>shot. Others can correct me, if I'm messing up. (Though this is pretty<br>simple, getting-started kind of stuff, and may be within my competency.)<br><br>It sounds as if you're trying to plug the WMS server URL directly into
<br>your browser, as given, and it's not working for you. That's not a<br>surprise. A WMS server needs a lot of complicated arguments appended to<br>the URL, and it doesn't return an HTML page, suitable for browsing.
<br><br>If you want to display a map, using data from WMS server, you'll need a<br>map viewer - like OpenLayers. Your browser should point to a web page<br>containing OpenLayers javascript code, and that web page should build a
<br>layer using the WMS URL you are working with.<br><br>Look at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openlayers.org/dev/examples/wms.html" target="_blank">http://openlayers.org/dev/examples/wms.html
</a><br><br>Then look at the code:<br><br> function init(){ <br> map = new OpenLayers.Map( 'map' );<br> layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",<br> "
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://labs.metacarta.com/wms/vmap0" target="_blank">http://labs.metacarta.com/wms/vmap0 </a>", {layers:<br>'basic'} );<br> map.addLayer
(layer);<br><br> map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);<br> map.addControl( new OpenLayers.Control.LayerSwitcher() ); <br> }<br><br>This declares a map, and adds a WMS layer, using a WMS server at
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://labs.metacarta.com/" target="_blank">labs.metacarta.com</a>.<br><br>If you replace that url with the one you have (putting in the real <br>username and password), you should be able to get a start.
<br><br>You may have to set the longitude and latitude to different values to<br>center the map where you want.<br><br>And the WMS server you're trying to access may not define a layer named <br>'basic'.<br><br>
You can get a list of available layers by passing a GetCapabilities<br>request to the WMS server. This will return an XML document describing<br>what the WMS server is capable of providing.<br><br>The URL for the metacarta site above is:
<br><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://labs.metacarta.com/wms/vmap0?version=1.1.1&service=wms&request=Ge" target="_blank">http://labs.metacarta.com/wms/vmap0?version=1.1.1&service=wms&request=Ge
</a><br>tCapabilities<br><br>For your site, it would be something like:<br><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://username:password@image.globexplorer.com/gexservlets/wms?version=" target="_blank">
http://username:password@image.globexplorer.com/gexservlets/wms?version= </a><br>1.1.1&service=wms&request=GetCapabilities<br><br><br><br>> -----Original Message-----<br>> From: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:linda.rawson@gmail.com" target="_blank">
linda.rawson@gmail.com</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:linda.rawson@gmail.com" target="_blank"> linda.rawson@gmail.com</a>]<br>> Sent: Monday, October 15, 2007 12:20 PM
<br>> To: Jeff Dege<br>> Subject: Re: OpenLayers Proxying in IIS<br>><br>> Jeff,<br>><br>> I am using Digital Globe and they gave me the following url <br>> for their WMS service. They suck! Anyway I have vented.
<br>><br>> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://username:password@image.globexplorer.com/gexservlets/wms" target="_blank">http://username:password@image.globexplorer.com/gexservlets/wms
</a> <br>><br>> How on earth do I send this URL to IE or tilecache? It<br>> totally returns errors. I assume I use a proxy but I was<br>> wondering if you could send me in the right direction.<br>><br>> Thanks,
<br>> Linda Rawson<br>><br>> Jeff Dege wrote:<br>> ><br>> > When I asked Erik whether it would be appropriate to suggest a<br>> > commercial package on the list, he said yes, it might be of help to
<br>> > others with the same problem, and it would probably<br>> encourage others to<br>> > offer their own solutions, which would also be of help to<br>> others with<br>> > the same problem.<br>> >
<br>> ><br>> >> -----Original Message-----<br>> >> From: John Cole [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:john.cole@uai.com" target="_blank">john.cole@uai.com
</a>]<br>> >> Sent: Friday, October 05, 2007 10:56 AM<br>> >> To: Jeff Dege; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:users@openlayers.org" target="_blank">users@openlayers.org
</a><br>> >> Subject: RE: [OpenLayers-Users] OpenLayers Proxying in IIS<br>> >><br>> >> Search the mailing list, I posted a WFS proxy in <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://asp.net/" target="_blank">
asp.net</a> a<br>> while back.<br>> >><br>> >> John<br>> >><br>> >> -----Original Message-----<br>> >> From: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:users-bounces@openlayers.org" target="_blank">
users-bounces@openlayers.org</a><br>> >> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>] On<br>> >> Behalf Of Jeff Dege
<br>> >> Sent: Friday, October 05, 2007 9:57 AM <br>> >> To: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br>> >> Subject: [OpenLayers-Users] OpenLayers Proxying in IIS
<br>> >><br>> >> OpenLayers uses AJAX, and AJAX has a problem with cross-domain http <br>> >> requests. So OpenLayers has a mechanism by which a proxy<br>> >> prefix can be<br>> >> prepended to every request, directing the request to a proxy
<br>> >> site on the<br>> >> host domain. <br>> >><br>> >> The issue has always been how to set up such a proxy site.<br>> >><br>> >> If your website is hosted by Apache, it's easy. Apache ships
<br>> >> with tools <br>> >> that make creating such a proxy easy.<br>> >><br>> >> If your website is IIS, it has not been. I, at least, have<br>> >> been unable<br>> >> to find either public domain code, or understandable
<br>> instructions, on<br>> >> how to create a proxying site for IIS.<br>> >><br>> >> I've asked on OpenLayers-Users, and had no answers. I've asked<br>> >> elsewhere, and had no answers.
<br>> >><br>> >> Eventually, I found a discussion of the issue:<br>> >><br>> >> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://blogs.msdn.com/david.wang/archive/2005/08/01/HOWTO_Comm" target="_blank">
http://blogs.msdn.com/david.wang/archive/2005/08/01/HOWTO_Comm </a><br>> >> on_URL_Red<br>> >> irection_Techniques_for_IIS_Summary.aspx<br>> >><br>> >> The relevant quote:<br>> >>
<br>> >> No one seems to provide modules to do Server-Side Redirection or <br>> >> Server-Side<br>> >> Forwarding on IIS for free. At least, I am not aware of any<br>> >> free/open-source
<br>> >> add-on IIS modules which implement those Server-Side<br>> behaviors; I <br>> >> only know<br>> >> of for-fee modules like ISAPIRewrite.<br>> >><br>> >> Which got me looking for ISAPIRewrite. This I found at:
<br>> >><br>> >> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.helicontech.com/isapi_rewrite/" target="_blank">http://www.helicontech.com/isapi_rewrite/</a><br>> >>
<br>> >> This is a commercial, but reasonably priced ($99), ISAPI<br>> >> filter DLL that<br>> >> implements the functionality of Apache's mod_rewrite and <br>> >> mod_proxy. And<br>
> >> with it, creating a forwarding proxy for OpenLayers is simple.<br>> >><br>> >> ISAPI_Rewrite has a "lite" version that is free, but the<br>> lite version <br>> >> doesn't do proxying. The commercial version is available
<br>> for download<br>> >> on a 45-day free trial. I downloaded it yesterday<br>> morning, and had a<br>> >> proxy working before lunchtime. <br>> >><br>> >> I know there are others who have had the same problem.
<br>> This may be of<br>> >> help.<br>> >><br>> >> _______________________________________________<br>> >> Users mailing list<br>> >> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Users@openlayers.org" target="_blank">
Users@openlayers.org</a><br>> >> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users </a><br>
> >><br>> >> No virus found in this incoming message.<br>> >> Checked by AVG Free Edition.<br>> >> Version: 7.5.488 / Virus Database: 269.14.0/1049 - Release<br>> >> Date: 10/4/2007
<br>> >> 8:59 AM<br>> >><br>> >><br>> >> No virus found in this outgoing message.<br>> >> Checked by AVG Free Edition.<br>> >> Version: 7.5.488 / Virus Database: 269.14.0
/1049 - Release<br>> >> Date: 10/4/2007<br>> >> 8:59 AM<br>> >><br>> >> This email and any files transmitted with it are confidential<br>> >> and intended solely for the use of the individual or entity
<br>> >> to whom they are addressed. If you have received this email<br>> >> in error please notify the sender. This message contains<br>> >> confidential information and is intended only for the
<br>> >> individual named. If you are not the named addressee you<br>> >> should not disseminate, distribute or copy this e-mail.<br>> >><br>> > _______________________________________________
<br>> > Users mailing list<br>> > <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>> > <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://openlayers.org/mailman/listinfo/users" target="_blank">
http://openlayers.org/mailman/listinfo/users </a><br>> ><br>> ><br>> Quoted from:<br>> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.nabble.com/OpenLayers-Proxying-in-IIS-tf4575776.htm" target="_blank">
http://www.nabble.com/OpenLayers-Proxying-in-IIS-tf4575776.htm</a><br>> l#a13064168<br>><br>><br></blockquote></div><br></span></div></blockquote></div><br>