title: call soap wsdl using jquery
body: <p>I have a webservice written in java and exposed using axis2server.I need to call the service using jquery.My UI is hosted in same machine but in different port(8080). I tried the following code </p>
  
  <pre><code>$('#submit').click(function (event) {
      alert("success");
      var soapmessage = "&lt;soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope' " + " xmlns:iris='http://iris.ramco.com'&gt;";
      soapmessage += "&lt;soap:Header/&gt;";
      soapmessage += "&lt;soap:Body&gt;";
      soapmessage += "&lt;iris:authenticateUser&gt;";
      soapmessage += "&lt;inputjson&gt;                {username:'admin',password:'admin12*'}&lt;/inputjson&gt;";
      soapmessage += "&lt;/iris:authenticateUser&gt;";
      soapmessage += "&lt;/soap:Body&gt;";
      soapmessage += "&lt;/soap:Envelope&gt;";
      alert(soapmessage);
      $.ajax({
          type: 'Post',
          url: 'http://localhost:8090/axis2/services/CiRISService',
          data: soapmessage,
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (data) {
              alert(data);
          },
          error: function (data) {
              alert("eror" + data.d);
          }
      });
      alert("Form Submitted");
  });
  </code></pre>
  
  <p>But i get undefined error.Thanks in advance.</p>