title: How to fix no SOAPAction header! error
body: <p>Please find below html soap client code which i am using to call my soap endpoint
  My  soap webservice is deployed in tomcat as axis project.</p>
  
  <p>Please find below client code</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;SOAP JavaScript Client Test&lt;/title&gt;
      &lt;script type="text/javascript"&gt;
          function soap() {
              var xmlhttp = new XMLHttpRequest();
              xmlhttp.open('POST', 'http://localhost:9090/SMSSoapInterface/services/smsxmlpushservicewsSoap11', true);
  
              // build SOAP request
              var sr =
                  '&lt;?xml version="1.0" encoding="utf-8"?&gt;' +
                  '&lt;soapenv:Envelope ' + 
                      'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
                      'xmlns:urn="urn:mm7pushinterface' +
                      'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;' +
                      '&lt;soapenv:Body&gt;' +
                              '&lt;urn:SubmitReq&gt;' +
                              '&lt;urn:MM7Version&gt;5.3.0&lt;/urn:MM7Version&gt;' +
                              '&lt;urn:SenderIdentification&gt;' +
                              '&lt;urn:VASPID&gt;1234&lt;/urn:VASPID&gt;'+
                              '&lt;urn:VASID&gt;12345&lt;/urn:VASID&gt;'+
                              '&lt;urn:CampaignName&gt;SOAP Campaign&lt;/urn:CampaignName&gt;'+
                              '&lt;urn:CampaignDesc&gt;test&lt;/urn:CampaignDesc&gt;'+
                              '&lt;urn:MsgCategory&gt;1&lt;/urn:MsgCategory&gt;'+
                              '&lt;urn:SenderAddress&gt;'+
                              '&lt;urn:RFC2822Address &gt;1244&lt;/urn:RFC2822Address&gt;'+
                              '&lt;urn:Number&gt;919901251515&lt;/urn:Number&gt;'+
                              '&lt;urn:ShortCode &gt;1234&lt;/urn:ShortCode&gt;'+
                              '&lt;/urn:SenderAddress&gt;'+
                              '&lt;/urn:SenderIdentification&gt;'+
                              '&lt;urn:Recipients&gt;'+
                              '&lt;urn:To&gt;'+
                              '&lt;urn:RFC2822Address &gt;6789&lt;/urn:RFC2822Address&gt;'+
                              '&lt;urn:Number &gt;919901251516&lt;/urn:Number&gt;'+
                              '&lt;urn:ShortCode &gt;7896&lt;/urn:ShortCode&gt;'+
                              '&lt;/urn:To&gt;'+
                              '&lt;/urn:Recipients&gt;'+
                              '&lt;/urn:Recipients&gt;'+
                      '&lt;/soapenv:Body&gt;' +
                  '&lt;/soapenv:Envelope&gt;';
  
              xmlhttp.onreadystatechange = function () {
                  if (xmlhttp.readyState == 4) {
                      if (xmlhttp.status == 200) {
                          alert('done. use firebug/console to see network response');
                      }
                  }
              }
              // Send the POST request
              xmlhttp.setRequestHeader('Content-Type', 'text/xml');
              xmlhttp.setRequestHeader('SOAPAction', "");
              xmlhttp.setRequestHeader('Access-Control-Allow-Headers', 'Authorization');
              xmlhttp.setRequestHeader('Access-Control-Allow-Methods', 'POST');
              xmlhttp.setRequestHeader('Access-Control-Allow-Origin', '*');
              xmlhttp.setRequestHeader('username', 'ecpDemoUser');
              xmlhttp.setRequestHeader('password', 'ecpDemo');
              xmlhttp.setRequestHeader('SOAPAction', "");
              xmlhttp.send(sr);
              // send request
              // ...
          }
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form name="Demo" action="" method="post"&gt;
          &lt;div&gt;
              &lt;input type="button" value="Soap" onclick="soap();" /&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt; &lt;!-- typo --&gt;
  </code></pre>
  
  <p>Below is the error/stack trace which i am getting when tried to hit soap webservice</p>
  
  <pre><code>no SOAPAction header!
         at org.apache.axis.transport.http.AxisServlet.getSoapAction(AxisServlet.java:1013)
         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:678)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
         at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
         at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
         at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>Below is the soap action present in wsdl</p>
  
  <pre><code>&lt;soap:operation soapAction=""/&gt;
  </code></pre>
  
  <p>Please let me know how to resolve this issue?</p>