title: jquery.ajax readystate 0, status 0
body: <p>I'm calling a .net xml webservice. the web method im calling is "validatePassword"
  I'm not sure what i'm doing wrong here. I'm still very new the jquery and ajax.</p>
  
  <pre><code> var name = $("#name",$("#loginPage")).val();
      var password = $("#password",$("#loginPage")).val();
      var ServiceUrl = "http://localhost:52146/SmartMeterMobile_WebService/User.asmx";    
       var soapEnv ="&lt;soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'&gt;\
                          &lt;soapenv:Body&gt; \
                           &lt;validatePassword xmlns='http://tempuri.org/'&gt;\
                  &lt;UserName&gt;"+name+"&lt;/UserName&gt;\
                  &lt;Password&gt;"+password+"&lt;/Password&gt;\
              &lt;/validatePassword&gt;\
              &lt;/soapenv:Body&gt; \
                  &lt;/soapenv:Envelope&gt;";
  
              $.ajax({
                  url: ServiceUrl,
                  type: "POST",
                  dataType: "xml",
                  data: soapEnv,
                  complete: processResult,
                  contentType: "text/xml; charset=\"utf-8\""
              });
  
  
  function processResult(xData, status) {
  
              $(xData.responseXML).find("NewDataSet").each(function() {
                 alert($(this).find("intUserIdUS"))
              });
          }
  </code></pre>
  
  <p>xml response.   </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;DataSet xmlns="http://tempuri.org/"&gt;
    &lt;xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&gt;
      &lt;xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"&gt;
        &lt;xs:complexType&gt;
          &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
            &lt;xs:element name="tblData"&gt;
              &lt;xs:complexType&gt;
                &lt;xs:sequence&gt;
                  &lt;xs:element name="intUserIdUS" type="xs:int" minOccurs="0" /&gt;
                &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;
            &lt;/xs:element&gt;
          &lt;/xs:choice&gt;
        &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
    &lt;/xs:schema&gt;
    &lt;diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&gt;
      &lt;NewDataSet xmlns=""&gt;
        &lt;tblData diffgr:id="tblData1" msdata:rowOrder="0"&gt;
          &lt;intUserIdUS&gt;1&lt;/intUserIdUS&gt;
        &lt;/tblData&gt;
      &lt;/NewDataSet&gt;
    &lt;/diffgr:diffgram&gt;
  &lt;/DataSet&gt;
  </code></pre>