1

I am trying to figure out a CORS header or cross domain issue but to no avail. We have an OpenLayers application hosted on a Linux server.
However, it calls a WMS service that is hosted on a Windows Server created through ArcGIS Server. The request goes out via an AJAX call but never comes back.

The outgoing request looks like this:

http://.../WMSServer?TRANSPARENT=true&LAYERS=6&QUERY_LAYERS=6&STYLES=,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-84.82432751264871,34.890657004827005,-79.56736950410722,36.72589197674798&FEATURE_COUNT=100&HEIGHT=824&WIDTH=1914&FORMAT=image/png&INFO_FORMAT=application/vnd.ogc.gml&SRS=EPSG:4326&X=1088&Y=271

I have verified this is something to do with a CORS header or cross domain I think because I took the same OpenLayers site and put in on the Windows server and it works.

I have tried a couple of thing like putting a crossdomain.xml in a couple of places on the Windows server but had no luck. Any help would be greatly appreciated.

0

1 Answer 1

2

The Usual method of doing cross domain requests in OpenLayers is to use a Proxy file.

Please see this answer on how to use a Proxy File.

2
  • Thanks for you reply Devdatta. Would I put the proxy host on the Linux (where the OpenLayers site lives) or the Windows WebServer (where the WMS web services live)?
    – geo derek
    Mar 3, 2013 at 17:25
  • You need to place the proxy on the linux server. Mar 4, 2013 at 1:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.