Dear All,
i am trying to call WFS service in arcgis javascript and its giving me following error
XMLHttpRequest cannot load http://192.168.100.47:7001/SpatialWS-SpatialWS-context-root/xmlwfsservlet?&service=WFS&request=GetCapabilities&version=1.0.0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8083' is therefore not allowed access.
here is my javascript
$(document).delegate('#wfsksaregions', 'change', function () {
if (this.checked) {
var opts = {
"url": "http://192.168.100.47:7001/SpatialWS-SpatialWS-context-root/xmlwfsservlet?",
"version": "1.0.0",
"nsLayerName": "mvdemons:wfsKsaRegions",
"wkid": 8307,
"mode": "SNAPSHOT",
"maxFeatures": 100,
"showDetails": true,
"infoTemplate": new InfoTemplate()
};
_public._kabopt = opts;
// esriConfig.defaults.io.proxyUrl = "localhost:8083";
esriConfig.defaults.io.alwaysUseProxy = false;
esri.config.defaults.io.corsEnabledServers.push("192.168.100.47:7001","192.168.100.47:8083");
var wfslayer = new WFSLayer(opts);
_public._kabwfslayer=wfslayer;
alert ("hellooooooooo i am here adding WFS layer111");
_public._kablayer = wfslayer;
map.addLayer(wfslayer);
//_public._kabwaterbodies.show()
}
else{
alert ("hellooooooooo i am here removing WFS layer111");
//_public._kabwaterbodies.hide()
}
});
please somebody reply me as soon as possible
Thanks
Kabeer