Jquery.get Can not Retrieve XML from RESTful Service

advertisements

I'm trying to get an XML document from a REST service using the Jquery get method, but it doesn't seem to be able to download. After only about 11 seconds, the connection dies and I receive a blank document. I've tested out the URL by accessing it through the browser, and it works (even though it takes 4 minutes to load).

$(document).ready(function()
{
    $.get(
        siteUrl,
        function(data) { parseXml(data); }
    );
});

I've considered using the ajax method, because you can set the timeout, but the same domain policy applies, restricting me from using it. Any ideas?


From documentation for jQuery.get()

This is a shorthand Ajax function, which is equivalent to:

$.ajax({
  url: url,
  data: data,
  success: success,
  dataType: dataType
});

So I'm not sure what you mean by "but the same domain policy applies, restricting me from using it." But if $.get works, so will $.ajax