title: How to call SOAP (XML) webservice in javascript or Jquery?
body: <p>I'm trying to call asp.net webservice in javascript / Jquery,
  i have tried so many examples but unfortunately not succeeded,</p>
  
  <p>here is the code which currently i'm trying,</p>
  
  <pre><code>    login("abc@gmail.com", "123456");
      var productServiceUrl = 'http://localhost:50575/Service1.asmx?op=test'; // Preferably write this out from server side
  
      function login(Email, Password) {
          var soapMessage = '&lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt; \
  &lt;soap:Body&gt; \
  &lt;login xmlns="http://test.com/"&gt; \
  &lt;Email&gt;' + Email + '&lt;/Email&gt; \
  &lt;Password&gt;' + Password + '&lt;/Password&gt; \
  &lt;/login&gt; \
  &lt;/soap:Body&gt; \
  &lt;/soap:Envelope&gt;';
  
          $.ajax({
              url: productServiceUrl,
              type: "GET",
              dataType: "xml",
              data: soapMessage,
              complete: endSaveProduct,
              error: function (a, b, c) {
                  alert(a + "\n"  + b + "\n" + c);
              },
              contentType: "text/xml; charset=\"utf-8\""
          });
  
          return false;
      }
  
      function endSaveProduct(xmlHttpRequest, status) {
          $(xmlHttpRequest.responseXML)
      .find('loginResult')
      .each(function () {
          alert( $(this).find('Message').text());
      });
      }
  </code></pre>
  
  <p>please help me out,
  Thanks in advance.</p>