jQuery ajax error is always "timeout" even when i'm giving wrong user/pwd
<p>I'm calling a SOAP webservice with jQuery ajax method. It works fine if there isn't a problem, but now I'm doing some tests, for example giving a wrong user name/password and the error that I receive is not the expected 401: Unauthorized. The call waits until the timeout is exceeded and then returns a timeout error...</p>

<p>I've tried my web service with wrong credentials on SOAPUI and I get the Unauthorized instant error message. My javascript call is the following:</p>

<pre class="lang-js prettyprint-override"><code>$.ajax({
    url : soapURL,
    type : 'POST',
    username : settings.get('user'),
    password : settings.get('pwd'),
    timeout : '30000',
    dataType : 'xml',
    data : soapReq,
    success : soapSuccess,
    error : soapError,
    contentType : 'text/xml; charset=\"utf-8\"',
    beforeSend : function() {
        $('#loader').show();
    },
    complete : function() {
        $('#loader').hide();
    }
}); 
</code></pre>

<p>And here the error callback function:</p>

<pre class="lang-js prettyprint-override"><code>function soapError(jqXHR, textStatus, errorThrown) {
alert('Ajax error: ' + textStatus);
}
</code></pre>
