title: "Uncaught SyntaxError: Unexpected token <" after successful HTTP Request
body: <p>I am trying to do AJAX using jQuery with an ODATA REST service provided by an SAP backend system.</p>
  
  <pre><code>          $.ajax({
                  type: 'GET',
                  url: 'http://sapxx.sapms/sap/opu/odata/.../',                   
                  async: true,
                  dataType: 'jsonp',                  
                  username: 'username',
                  password: 'password',
                  crossDomain: true,                  
                  success: function() {
                      alert('Done.');
                  },
                  error: function() {
                      alert('Error.');
                  },
              });
  </code></pre>
  
  <p>The request returns status 200 and I get a response from the server which is called something like "?callback=jQuery3100687..." and contains xml code. All this is visible in the Chrome debugger. But after the successful HTTP Request I get the aforementioned error</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt;
  </code></pre>
  
  <p>I suspect the error is due to the "dataType" parameter which is set to "jsonp" in the request. Is there any way to work around this error? The server can only respond using XML format. The request only works when the dataType is set to "jsonp", I guess because it enables CORS. After sending the request, I get the "Error" alert despite the 200 status.</p>