title: Soap Canonicalization Transform
body: <p>I am trying to work with a soap service hosted on a Datapower appliance. So far, the sending soap service and the receiver calculate the digest differently for the following xml.</p>
  
  <p>The transform that is applied to create the digest value</p>
  
  <pre><code>&lt;ds:Reference URI="#TS-f3c103e9-1897-43d8-8cf6-274bdb647678"&gt;
      &lt;ds:Transforms&gt;
         &lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;
            &lt;ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse soap"/&gt;
         &lt;/ds:Transform&gt;
     &lt;/ds:Transforms&gt;
     &lt;ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
     &lt;ds:DigestValue&gt;1rjXQQWVMM5KBWY8uswUynk6PCk=&lt;/ds:DigestValue&gt;
  &lt;/ds:Reference&gt;
  </code></pre>
  
  <p>The referenced element.</p>
  
  <pre><code>&lt;wsu:Timestamp wsu:Id="TS-f3c103e9-1897-43d8-8cf6-274bdb647678"&gt;
    &lt;wsu:Created&gt;2016-02-24T15:32:12.693Z&lt;/wsu:Created&gt;
    &lt;wsu:Expires&gt;2016-02-24T15:37:12.693Z&lt;/wsu:Expires&gt;
  &lt;/wsu:Timestamp&gt;
  </code></pre>
  
  <p>Namespaces for above elements are applied on the root node</p>
  
  <ul>
  <li>xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"</li>
  <li>xmlns:ds="http://www.w3.org/2000/09/xmldsig#"</li>
  </ul>
  
  <p>Sending the above XML works correctly (created from a Java soap client library). However, when I digest that same element with sha1 in node, I get a different digest value.</p>
  
  <p>I am trying to discover what java does in the transform before calculating the digest value. If I can figure out what it actually sends to its sha1 method, I can correct the code in node to do the very same.</p>
  
  <p>Given the above reference element, what is the output xml after the transform prior to hashing with sha1?</p>