I'm manually constructing some XML to post to our server, I've validated the XML and it is valid and without error.
Here is my post:
$.ajax({
type: 'POST',
url: submitUrl,
data: xmlString,
dataType: 'text',
beforeSend:function() {
console.log(submitUrl);
},
success:function(data) {
console.log(data);
},
error:function(error) {
console.log(error);
}
});
var xmlString is a text string containing XML, I can't post it publicly unfortunately but in essence it looks like:
var xmlString = '<?xml version="1.0" encoding="utf-8"?> ... '
The code is running on a web server, rather than locally, but all I seem to get is:
XMLHttpRequest cannot load <URL>. Origin <URL> is not allowed by Access-Control-Allow-Origin.
However the server is open not locked down to these types of requests so the post should be getting through however I get the above message each time.
Any ideas, things I can try, ways I can get better debug messages?