title: What has to be changed client-side or server-side to make getJSON() work?
body: <p>I'm working with some web services that have already been created and I need to call them using ajax. The site I'm working on is hosted in a different domain than that of the web services. I'm now aware of the problems this causes with the same-origin policy.</p>
  
  <p>I'm trying to get round it using JSON, based on articles:</p>
  
  <p><a href="http://api.jquery.com/jQuery.getJSON/" rel="nofollow">JQuery API</a></p>
  
  <p><a href="http://www.ibm.com/developerworks/library/wa-aj-jsonp1/" rel="nofollow">IBM on cross-domain comms</a></p>
  
  <p>and tonnes of other questions on here. </p>
  
  <p>I have tried the following code (replaced actual domain with "webservice"):</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
            $(document).ready(function(){
          $.getJSON("http://webservice/restserver.aspx?",
          {
              method: "userInfo",
              userID: "039304303930302",
              sessionID: "STRING",
                  format: "json"
  
          },
           function(data) {
                  alert("GET Returned");
          });
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>1) Is there anything terribly wrong with this as I'm new to JSON and AJAX</p>
  
  <p>2) Does the web service need to have a callback e.g.- "&amp;callback=?" added to it </p>
  
  <p>3) Is there any other way to get around cross-domain calls </p>
  
  <p>Any suggestions or help will be most welcome as I have working on this for ages.</p>
  
  <p>Thanks!</p>