title: Passing Bearer token in HTTP header
body: <p>I have a similar problem to this <a href="https://stackoverflow.com/questions/18780457/mvc-add-token-in-http-header">Question</a> where I have to send my Authorization token (Bearer token_id) in my soap request header.
  This is the beginning of the XML request:</p>
  
  <pre><code>&lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:com="http://target.it/"&gt;
     &lt;soap:Header&gt;
        &lt;com:Authentication&gt;Bearer token_id&lt;/com:Authentication&gt;
     &lt;/soap:Header&gt;
  </code></pre>
  
  <p>This code doesn't work, I've tried different keywords and formats but I always get the following error code:</p>
  
  <pre><code>&lt;soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"&gt;
     &lt;soapenv:Code&gt;
        &lt;soapenv:Value&gt;soapenv:Client&lt;/soapenv:Value&gt;
     &lt;/soapenv:Code&gt;
     &lt;soapenv:Reason&gt;
        &lt;soapenv:Text xml:lang="en"&gt;Authentication Failure&lt;/soapenv:Text&gt;
     &lt;/soapenv:Reason&gt;
     &lt;soapenv:Detail&gt;Required OAuth credentials not provided&lt;/soapenv:Detail&gt;
  &lt;/soapenv:Fault&gt;
  </code></pre>
  
  <p>I'm using SoapUI to do this, and if I add a custom HTTP header through the application's utility it works perfectly, but for my requirement I need to have it through code. <a href="https://i.stack.imgur.com/1FMx7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1FMx7.png" alt="The + says &quot;add custom HTTP header&quot;"></a></p>
  
  <p>Can anybody help me? 
  Thanks. </p>