adding SOAP header in SOAP envelope using XSLT
<p>i have an incoming SOAP message where there were no SOAP header tag present i need to add SOAP header in that. I am using this XSLT for doing this but SOAP HEADER is not getting added.
XSLT:</p>

<pre><code>&lt;xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:dp="http://www.datapower.com/extensions" 
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 extension-element-prefixes="dp" 
 exclude-result-prefixes="dp"  &gt;
  &lt;xsl:variable name="uuid" select="dp:variable('var://context/txn/uuid')" /&gt;
 &lt;xsl:template match="node()|@*"&gt;
     &lt;xsl:copy&gt;
       &lt;xsl:apply-templates select="node()|@*"/&gt;
     &lt;/xsl:copy&gt;
 &lt;/xsl:template&gt; 
&lt;xsl:template match="soapenv:Header"&gt;
    &lt;soapenv:Header&gt; 
        &lt;UUID&gt;&lt;xsl:value-of select="$uuid"/&gt;&lt;/UUID&gt;
    &lt;/soapenv:Header&gt;   
&lt;/xsl:template&gt; 
&lt;/xsl:stylesheet&gt;
</code></pre>

<p>The incomig SOAP mesagge can have header tag or it might not have header tag</p>

<p>Input SOAP Message Without Header tag:</p>

<pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
   &lt;soapenv:Body&gt;
      &lt;hmhs-medical-acknowledgement id="4080186649" result="FAIL""/&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;
</code></pre>

<p>Input SOAP Message With Header tag:    </p>

<pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
   &lt;soapenv:Header/&gt;    
       &lt;soapenv:Body&gt;
          &lt;hmhs-medical-acknowledgement id="4080186649" result="FAIL""/&gt;
       &lt;/soapenv:Body&gt;
 &lt;/soapenv:Envelope&gt;
</code></pre>

<p>Required Output SOAP Message:</p>

<pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
   &lt;soapenv:Header&gt;
&lt;UUID&gt;71A4B2FA029D412787B06E07685ED101&lt;/UUID&gt;
&lt;/soapenv:Header&gt;
   &lt;soapenv:Body&gt;
      &lt;hmhs-medical-acknowledgement id="4080186649" result="FAIL""/&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;
</code></pre>

<p>Can somebody help how to add the SOAP header in that.</p>