title: Message header and XML
body: <p>I have an xml file. I have to add the XMl file to message header of WCF request.</p>
  
  <p>I am using OperationContextScope for this</p>
  
  <pre><code>using (OperationContextScope scope = new OperationContextScope(myClient.InnerChannel))
          {
              var samlHeader = CreateSAMLAssertion();
              OperationContext.Current.OutgoingMessageHeaders.Add(
                      // Add smalheader which is a xml hear
  
                  );       
          } 
  </code></pre>
  
  <p>edit:</p>
  
  <p>samlHeader  xml looks like this </p>
  
  <pre><code>&lt;Security xmlns="http://docs.oasis-open.org/x/xxxxx.xsd" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"&gt;
   &lt;Assertion ID="xxxxx" IssueInstant="xxxxxxx" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&gt;
   &lt;--Removed--&gt;
   &lt;/Assertion&gt;
  &lt;/Security&gt;
  </code></pre>
  
  <p>I want the struct of the SOAP request to look like this</p>
  
  <pre><code>&lt;soapenv:Envelope ........&gt;
      &lt;soapenv:Header&gt;
            I want to add my xml (smalheader) here
      &lt;/soapenv:Header&gt;
      &lt;soapenv:Body&gt;
      &lt;soapenv:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>edit complete</p>
  
  <p>Can any one please point me to the right direction</p>