title: SOAP WSS4JInInterceptor Security processing failed (actions mismatch)
body: <p>I have been struggling, for several days trying to get a simple SOAP request to pass WS-Security, after many emails I was finally able to get some logs out of the service provider...</p>
  <p>Note that the webservice is SOAP 1.2</p>
  <pre><code>2021-04-11 23:49:24,052:INFO :ajp-nio-127.0.0.1-8009-exec-5:ptor.Soap12FaultOutInterceptor:class org.apache.cxf.binding.soap.interceptor.Soap12FaultOutInterceptor$Soap12FaultOutInterceptorInternalapplication/soap+xml
  2021-04-11 23:49:47,867:WARN :ajp-nio-127.0.0.1-8009-exec-28:urity.wss4j.WSS4JInInterceptor:Security processing failed (actions mismatch)
  2021-04-11 23:49:47,867:WARN :ajp-nio-127.0.0.1-8009-exec-28:xf.phase.PhaseInterceptorChain:Interceptor for {http://[redacted]/rti/cdd/wsdl}CDDService has thrown exception, unwinding now
  </code></pre>
  <p>Sadly this hasn't helped much as in searching for this error it appears to be quite ambiguous, one of which mentioning a bug in the WSS4JInInterceptor where whitespace between the body open tag, and the first node can cause this, however even in removing that whitespace, I still receive the same error.</p>
  <p>Here is the XML I'm sending (using <code>Content-Type: application/soap+xml;charset=utf-8;action=&quot;mySoapAction&quot;</code> header), the service provider has confirmed they are receiving the XML body in full:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;soapenv:Envelope xmlns:sch=&quot;http://[redacted]/rti/cdd/schema&quot; xmlns:soapenv=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;
      &lt;soapenv:Header&gt;
          &lt;wsse:Security xmlns:wsse=&quot;http://docs.oasis-open.org/wss/2004/01/oasis200401-wss-wssecurity-secext-1.0.xsd&quot; soapenv:mustUnderstand=&quot;1&quot;&gt;
              &lt;wsse:UsernameToken xmlns:wsu=&quot;http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; wsu:Id=&quot;UsernameToken-1618447264&quot;&gt;
                  &lt;wsse:Username&gt;[redacted]&lt;/wsse:Username&gt;
                  &lt;wsse:Password Type=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-tokenprofile-1.0#PasswordText&quot;&gt;[redacted]&lt;/wsse:Password&gt;
              &lt;/wsse:UsernameToken&gt;
          &lt;/wsse:Security&gt;
      &lt;/soapenv:Header&gt;
      &lt;soapenv:Body&gt;
          &lt;sch:cddRequest clientID=&quot;1213&quot; clientCandidateId=&quot;3&quot;&gt;
              &lt;candidateName&gt;
                  &lt;firstName&gt;Learner&lt;/firstName&gt;
                  &lt;lastName&gt;Learner&lt;/lastName&gt;
              &lt;/candidateName&gt;
              &lt;webAccountInfo&gt;
                  &lt;email&gt;learner@nowhere.com&lt;/email&gt;
              &lt;/webAccountInfo&gt;
              &lt;lastUpdate&gt;2021/04/15 00:47:44 BST&lt;/lastUpdate&gt;
              &lt;primaryAddress&gt;
                  &lt;addressType&gt;Home&lt;/addressType&gt;
                  &lt;address1&gt;[redacted]&lt;/address1&gt;
                  &lt;address2&gt;[redacted]&lt;/address2&gt;
                  &lt;city&gt;Gold Coast&lt;/city&gt;
                  &lt;postalCode&gt;4218&lt;/postalCode&gt;
                  &lt;country&gt;AU&lt;/country&gt;
                  &lt;phone&gt;
                      &lt;phoneNumber&gt;[redacted]&lt;/phoneNumber&gt;
                      &lt;phoneCountryCode&gt;[redacted]&lt;/phoneCountryCode&gt;
                  &lt;/phone&gt;
              &lt;/primaryAddress&gt;
              &lt;candidatePrefs&gt;
                  &lt;candidatePref prefType=&quot;ConfirmationPreference&quot;&gt;
                      &lt;prefOption&gt;email&lt;/prefOption&gt;
                  &lt;/candidatePref&gt;
                  &lt;candidatePref prefType=&quot;ReminderPreference&quot;&gt;
                      &lt;prefOption&gt;email&lt;/prefOption&gt;
                  &lt;/candidatePref&gt;
                  &lt;candidatePref prefType=&quot;LocalePreference&quot;&gt;
                      &lt;prefOption&gt;en_GB&lt;/prefOption&gt;
                  &lt;/candidatePref&gt;
              &lt;/candidatePrefs&gt;
          &lt;/sch:cddRequest&gt;
      &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  <p>Any help greatly appreciated.</p>