Hi all,
I’m trying to build a custom web client for iDigi on my own server and having trouble getting it to work.
First I tried the Basic Web Services Example here: http://www.digi.com/wiki/developer/index.php/Basic_Web_Services_Example_using_iDigi_Dia
But have never been able to get it to work on any browser, because the request always gives this error:
XMLHttpRequest cannot load http://developer.idigi.com/ws/sci. Origin http://(mydomain) is not allowed by Access-Control-Allow-Origin.
As far as I can tell, iDigi is not serving the Access-Control-Allow-Origin header at all, implying that no one would be allowed to access iDigi web services from a browser at all. That would really be disappointing, wouldn’t it?
However, I found one situation in which I can make it work, on Safari OSX, but only when read as a local file (file:// scheme instead of http://)! Bizarre???
The jQuery ajax request I’m using looks like:
$.ajax({
url: idigiURL+"/ws/sci",
data: whichXML,
type: 'GET',
dataType: "text/xml",
success: gotResponse,
});
This is the barest form that works as a local file in Safari.
So clearly it is possible, but there’s got to be some other information necessary for getting it to work on any browser from any origin domain.
Has anyone else gotten any of this to work? I’m frustrated that it’s been so difficult to get this going.