Currently, I am attempting to make a web service call from JavaScript using AJAX:
$.ajax({
type: "GET",
url: "http://[REMOTE-SERVER-IP]:8080/api/service",
contentType: "application/jsonp",
crossDomain: true,
success: successFunc,
error: errorFunc
});
My research has shown that in order to allow access to the method, a "crossdomain.xml" file needs to be created on the server at http://[REMOTE-SERVER-IP]:8080/crossdomain.xml:
<cross-domain-policy>
<allow-access-from domain="[SERVICE-CALLER-IP]"/>
</cross-domain-policy>
However, even after taking these steps, when trying to call the method, an error is being displayed by the JavaScript debugger:
XMLHttpRequest cannot load http://[REMOTE-SERVER-IP]:8080/[URL]. Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin
I am unsure of what I might be doing wrong. Any insights would be greatly appreciated!
Thank you for your help!