I think you have to use a proxy because that&#39;s how WFS works, that will end up making any request you use through openlayers go through a proxy also. I am sort of new to openlayers as well and just figure stuff out from their examples and experimentation. I just plug in urls in openlayers to my rails server and then see what kinds of requests openlayers sends out that come out in the console or log and try to figure out how to handle them etc. They have some examples on the proxy. I think they have a perl cgi example. What is your web server ? Are you use PHP, Java, etc ? <br>
<br><div class="gmail_quote">On Wed, Dec 9, 2009 at 4:04 AM, Damith Amarasena <span dir="ltr">&lt;<a href="mailto:amarasenadamith@gmail.com">amarasenadamith@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Lammie,<br><br>Thanks
for your reply. You have mentioned about a proxy here. Does that mean I
have to use one? Sorry if you feel this as a dumb question, but I&#39;m new
to openlayers and whole GIS stuff. Please guide me on this.<br>
<br>Regards,<br>damith<br><br><div class="gmail_quote"><div><div class="h5">On Wed, Dec 9, 2009 at 2:02 AM, Lammie Jonson <span dir="ltr">&lt;<a href="mailto:jrubiando@gmail.com" target="_blank">jrubiando@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="h5">
//   Here&#39;s is how I did this. <br><br>// You need to use the openlayers proxy:<br><br>     OpenLayers.ProxyHost=&quot;proxy.cgi?url=&quot;;<br><br>// WFS layer points to geoserver or your host<br><br>            state_layer = new OpenLayers.Layer.WFS( &quot;States WFS&quot;,<br>


                  &quot;<a href="http://yourhost:8080/geoserver/wfs" target="_blank">http://yourhost:8080/geoserver/wfs</a>&quot;,<br>                    { typename: &#39;topp:states&#39;} );<br><br>===============<br><br>

I&#39;m using rails, so I create a sort of fake proxy in config/routes.rb<br>
<br> map.connect &#39;/proxy.cgi&#39;,<br>    :controller =&gt; &#39;wfs&#39;,<br>    :action =&gt; &#39;myproxy&#39;<br><br>Then inside the myproxy() action:<br><br>if url =~ /geoserver/<br>     # geo server WFS data<br>


     uri = URI.parse(url)<br>     resp = Net::HTTP.get_response(uri)<br>     send_data(resp.body, :type =&gt; &#39;text/xml&#39;)<br> end<br>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>
</blockquote></div>