I am having trouble getting a WFS layer working using Geoserver, OpenLayers and GeoExt.
I get the following error:
XMLHttpRequest cannot load http://10.0.0.155/geoserver/wfs. Origin http://10.0.0.155:8080 is not allowed by Access-Control-Allow-Origin.
Does anyone know how I get around this? I can't find anything in the examples for geoserver, openlayers or geoext.
I don't get any errors when using WMS on my maps.
I think this is this problem http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost
so you need to set up a proxy host as per those instructions.
Requests between domains is not allowed for XMLhttprequest stuff. Requesting JSONP as outputformat might also by a solution to. this not in the official OGC-spec, but Geoserver supports this. But I don't know if openlayers supports jsonp. (there is a plugin for leaflet that does ) See: http://docs.geoserver.org/latest/en/user/services/wfs/outputformats.html