<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re-calculating XML-Signature DigestValue
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/giogio">Giovanni Castellari</a> in <i>JBoss Web Services Development</i> - <a href="http://community.jboss.org/message/575452#575452">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello everyone, I'm a new user and hope it is the right section for my question.</p><p>I've configured JBoss for working with WS-Security, in particular with the signature of xml messages. Everything works well: upon the receipt of a request, I can see the signed xml message in the log and I also can find sentences like these:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">2010-12-07 17:37:40,404 INFO&#160; [org.apache.xml.security.signature.Reference] Verification successful for URI "#element-1-1291739860070-11803898"</div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">2010-12-07 17:37:40,405 INFO&#160; [org.apache.xml.security.signature.Reference] Verification successful for URI "#timestamp"</div><p>2010-12-07 17:37:40,404 INFO&#160; [org.apache.xml.security.signature.Reference] Verification successful for URI "#element-1-1291739860070-11803898"</p><p>2010-12-07 17:37:40,405 INFO&#160; [org.apache.xml.security.signature.Reference] Verification successful for URI "#timestamp"</p></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The problem now is that my boss wants me to "manually" recalculate the digests of the various signed parts. After googling for a while, this is what I've understood:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>- Everything concerned with the digest calculation, the signature and its verification is embedded inside the xml request: which parts are signed (inside &lt;Reference&gt; tags), which transformations the xml message was treated (&lt;Transforms&gt;), which computations were done to produce the digest value (&lt;DigestMethod&gt;), the resulting digest (&lt;DigestValue&gt;) and signature (= encrypting of the digest, &lt;SignatureValue&gt;)&#160; for each part.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>- Therefore, the steps to calculate the digest for a part are: 1) Canonicalize that xml part; 2) Produce SHA1 of that part; 3) Convert to Base64. I should obtain exactly the same digest value contained in the &lt;DigestValue&gt; element of the xml message.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>But I can't obtain the same digest value written in the xml message. Here's an output of a java main I wrote (I can also paste some code in next posts if someone wants to help). As you can see, I'm trying to calculate the digest value of the reference 'timestamp'. What's wrong? Bad canonical form? Bad sha1 value? I'd be VERY grateful if someone could obtain the same &lt;DigestValue&gt; and could tell me the exact steps/tools/code used. Thanks!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><p>----------------------------ORIGINAL XML------------------------</p><p><span>&lt;env:Envelope xmlns:env='</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a><span>'&gt;</span></p><p> &lt;env:Header&gt;</p><p><span>&#160; &lt;wsse:Security env:mustUnderstand='1' xmlns:wsse='</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</a><span>' xmlns:wsu='</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a><span>'&gt;</span></p><p>&#160;&#160; &lt;wsu:Timestamp wsu:Id='timestamp'&gt;</p><p>&#160;&#160;&#160; &lt;wsu:Created&gt;2010-12-07T16:37:40.038Z&lt;/wsu:Created&gt;</p><p>&#160;&#160; &lt;/wsu:Timestamp&gt;</p><p><span>&#160;&#160; &lt;wsse:BinarySecurityToken EncodingType='</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary</a><span>' ValueType='</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3</a><span>' wsu:Id='token-2-1291739860138-12935734'&gt;MIIBnDCCAQUCBEz+E1kwDQYJKoZIhvcNAQEEBQAwFTETMBEGA1UEAxMKbWlvY2xpZW50MTAeFw0x</span></p><p>MDEyMDcxMDU4MzNaFw0xMTAzMDcxMDU4MzNaMBUxEzARBgNVBAMTCm1pb2NsaWVudDEwgZ8wDQYJ</p><p>KoZIhvcNAQEBBQADgY0AMIGJAoGBAJlzh8T0w+FG/uJ6oDzc6uVSJMgJhuL851BPjoAynW7wCeGV</p><p>1EEydEr2S9qOwsUEg32mLn6s9Mf19nkI3nGHjCuS9SmIil5WilWGWsHqfFSUFB7goKeLfqdGtP5i</p><p>WDZ4QFVZ0AjMjJZP9tAY8FYzkmJUEkcg5T2OcW/1019/Ttk5AgMBAAEwDQYJKoZIhvcNAQEEBQAD</p><p>gYEAP6De4XP3wSYDWqSUCgJZNqddZUJFIDxYp5cV6jH4yckV/xniD3IvVcTx8bCykbwWDEec3z95</p><p>BdYWNPuU2DPWtcab3dTtD7JXez1+Ywi2IYIexChQbthkziLXkvGoPofe9Z7BlaE3hiFzPMKWRjDF</p><p>qSOScxAyjSebLPvczWozAWQ=&lt;/wsse:BinarySecurityToken&gt;</p><p><span>&#160;&#160; &lt;ds:Signature xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;</span></p><p><span>&#160;&#160;&#160; &lt;ds:SignedInfo xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;</span></p><p><span>&#160;&#160;&#160;&#160; &lt;ds:CanonicalizationMethod Algorithm='</span><a class="jive-link-external-small" href="http://www.w3.org/2001/10/xml-exc-c14n#" target="_blank">http://www.w3.org/2001/10/xml-exc-c14n#</a><span>' xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#'/" target="_blank">http://www.w3.org/2000/09/xmldsig#'/</a><span>&gt;</span></p><p><span>&#160;&#160;&#160;&#160; &lt;ds:SignatureMethod Algorithm='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#rsa-sha1" target="_blank">http://www.w3.org/2000/09/xmldsig#rsa-sha1</a><span>' xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#'/" target="_blank">http://www.w3.org/2000/09/xmldsig#'/</a><span>&gt;</span></p><p><span>&#160;&#160;&#160;&#160; &lt;ds:Reference URI='#element-1-1291739860070-11803898' xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;</span></p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;ds:Transforms xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160; &lt;ds:Transform Algorithm='</span><a class="jive-link-external-small" href="http://www.w3.org/2001/10/xml-exc-c14n#" target="_blank">http://www.w3.org/2001/10/xml-exc-c14n#</a><span>' xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#'/" target="_blank">http://www.w3.org/2000/09/xmldsig#'/</a><span>&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; &lt;/ds:Transforms&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;ds:DigestMethod Algorithm='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#sha1" target="_blank">http://www.w3.org/2000/09/xmldsig#sha1</a><span>' xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#'/" target="_blank">http://www.w3.org/2000/09/xmldsig#'/</a><span>&gt;</span></p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;ds:DigestValue xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;d2cIarD4atw3HFADamfO9YTKkKs=&lt;/ds:DigestValue&gt;</span></p><p>&#160;&#160;&#160;&#160; &lt;/ds:Reference&gt;</p><p><span>&#160;&#160;&#160;&#160; &lt;ds:Reference URI='#timestamp' xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;</span></p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;ds:Transforms xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160; &lt;ds:Transform Algorithm='</span><a class="jive-link-external-small" href="http://www.w3.org/2001/10/xml-exc-c14n#" target="_blank">http://www.w3.org/2001/10/xml-exc-c14n#</a><span>' xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#'/" target="_blank">http://www.w3.org/2000/09/xmldsig#'/</a><span>&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; &lt;/ds:Transforms&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;ds:DigestMethod Algorithm='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#sha1" target="_blank">http://www.w3.org/2000/09/xmldsig#sha1</a><span>' xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#'/" target="_blank">http://www.w3.org/2000/09/xmldsig#'/</a><span>&gt;</span></p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;ds:DigestValue xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;YR/fZlwJdw+KbyP24UYiyDv8/Dc=&lt;/ds:DigestValue&gt;</span></p><p>&#160;&#160;&#160;&#160; &lt;/ds:Reference&gt;</p><p>&#160;&#160;&#160; &lt;/ds:SignedInfo&gt;</p><p><span>&#160;&#160;&#160; &lt;ds:SignatureValue xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;</span></p><p>OZg96GMrGh0cEwbpHwv3KDhFtFcnzPxbwp9Xv0pgw8Mr9+NIjRlg/G1OyIZ3SdcOYqqzF4/TVLDi</p><p>5VclwnjBAFl3SEdkyUbbjXVAGkSsxPQcC4un9UYcecESETlAgV8UrHV3zTrjAWQvDg/YBKveoH90</p><p>FIhfAthslqeFu3h9U20=</p><p>&lt;/ds:SignatureValue&gt;</p><p><span>&#160;&#160;&#160; &lt;ds:KeyInfo xmlns:ds='</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>'&gt;</span></p><p>&#160;&#160;&#160;&#160; &lt;wsse:SecurityTokenReference wsu:Id='reference-3-1291739860138-11726490'&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;wsse:Reference URI='#token-2-1291739860138-12935734' ValueType='</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3'/" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3'/</a><span>&gt;</span></p><p>&#160;&#160;&#160;&#160; &lt;/wsse:SecurityTokenReference&gt;</p><p>&#160;&#160;&#160; &lt;/ds:KeyInfo&gt;</p><p>&#160;&#160; &lt;/ds:Signature&gt;</p><p>&#160; &lt;/wsse:Security&gt;</p><p> &lt;/env:Header&gt;</p><p><span> &lt;env:Body wsu:Id='element-1-1291739860070-11803898' xmlns:wsu='</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a><span>'&gt;</span></p><p><span>&#160; &lt;ns1:addizionami xmlns:ns1='</span><a class="jive-link-external-small" href="http://prova/ejb/to/ws/types" target="_blank">http://prova/ejb/to/ws/types</a><span>' xmlns:ns2='</span><a class="jive-link-external-small" href="http://prova/ejb/to/ws/types" target="_blank">http://prova/ejb/to/ws/types</a><span>'&gt;</span></p><p>&#160;&#160; &lt;Integer_1&gt;3&lt;/Integer_1&gt;</p><p>&#160;&#160; &lt;Integer_2&gt;78&lt;/Integer_2&gt;</p><p>&#160; &lt;/ns1:addizionami&gt;</p><p> &lt;/env:Body&gt;</p><p>&lt;/env:Envelope&gt;</p><p>----------------------------END ORIGINAL XML------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>------------------CANONICAL XML MESSAGE (using org.apache.xml.security.c14n.Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS)-------------</p><p><span>&lt;env:Envelope xmlns:env="</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a><span>"&gt;</span></p><p> &lt;env:Header&gt;</p><p><span>&#160; &lt;wsse:Security xmlns:wsse="</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</a><span>" env:mustUnderstand="1"&gt;</span></p><p><span>&#160;&#160; &lt;wsu:Timestamp xmlns:wsu="</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a><span>" wsu:Id="timestamp"&gt;</span></p><p>&#160;&#160;&#160; &lt;wsu:Created&gt;2010-12-07T16:37:40.038Z&lt;/wsu:Created&gt;</p><p>&#160;&#160; &lt;/wsu:Timestamp&gt;</p><p><span>&#160;&#160; &lt;wsse:BinarySecurityToken xmlns:wsu="</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a><span>" EncodingType="</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary</a><span>" ValueType="</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3</a><span>" wsu:Id="token-2-1291739860138-12935734"&gt;MIIBnDCCAQUCBEz+E1kwDQYJKoZIhvcNAQEEBQAwFTETMBEGA1UEAxMKbWlvY2xpZW50MTAeFw0x</span></p><p>MDEyMDcxMDU4MzNaFw0xMTAzMDcxMDU4MzNaMBUxEzARBgNVBAMTCm1pb2NsaWVudDEwgZ8wDQYJ</p><p>KoZIhvcNAQEBBQADgY0AMIGJAoGBAJlzh8T0w+FG/uJ6oDzc6uVSJMgJhuL851BPjoAynW7wCeGV</p><p>1EEydEr2S9qOwsUEg32mLn6s9Mf19nkI3nGHjCuS9SmIil5WilWGWsHqfFSUFB7goKeLfqdGtP5i</p><p>WDZ4QFVZ0AjMjJZP9tAY8FYzkmJUEkcg5T2OcW/1019/Ttk5AgMBAAEwDQYJKoZIhvcNAQEEBQAD</p><p>gYEAP6De4XP3wSYDWqSUCgJZNqddZUJFIDxYp5cV6jH4yckV/xniD3IvVcTx8bCykbwWDEec3z95</p><p>BdYWNPuU2DPWtcab3dTtD7JXez1+Ywi2IYIexChQbthkziLXkvGoPofe9Z7BlaE3hiFzPMKWRjDF</p><p>qSOScxAyjSebLPvczWozAWQ=&lt;/wsse:BinarySecurityToken&gt;</p><p><span>&#160;&#160; &lt;ds:Signature xmlns:ds="</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#" target="_blank">http://www.w3.org/2000/09/xmldsig#</a><span>"&gt;</span></p><p>&#160;&#160;&#160; &lt;ds:SignedInfo&gt;</p><p><span>&#160;&#160;&#160;&#160; &lt;ds:CanonicalizationMethod Algorithm="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/10/xml-exc-c14n#" target="_blank">http://www.w3.org/2001/10/xml-exc-c14n#</a><span>"&gt;&lt;/ds:CanonicalizationMethod&gt;</span></p><p><span>&#160;&#160;&#160;&#160; &lt;ds:SignatureMethod Algorithm="</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#rsa-sha1" target="_blank">http://www.w3.org/2000/09/xmldsig#rsa-sha1</a><span>"&gt;&lt;/ds:SignatureMethod&gt;</span></p><p>&#160;&#160;&#160;&#160; &lt;ds:Reference URI="#element-1-1291739860070-11803898"&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;ds:Transforms&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160;&#160; &lt;ds:Transform Algorithm="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/10/xml-exc-c14n#" target="_blank">http://www.w3.org/2001/10/xml-exc-c14n#</a><span>"&gt;&lt;/ds:Transform&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; &lt;/ds:Transforms&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;ds:DigestMethod Algorithm="</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#sha1" target="_blank">http://www.w3.org/2000/09/xmldsig#sha1</a><span>"&gt;&lt;/ds:DigestMethod&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; &lt;ds:DigestValue&gt;d2cIarD4atw3HFADamfO9YTKkKs=&lt;/ds:DigestValue&gt;</p><p>&#160;&#160;&#160;&#160; &lt;/ds:Reference&gt;</p><p>&#160;&#160;&#160;&#160; &lt;ds:Reference URI="#timestamp"&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;ds:Transforms&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160;&#160; &lt;ds:Transform Algorithm="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/10/xml-exc-c14n#" target="_blank">http://www.w3.org/2001/10/xml-exc-c14n#</a><span>"&gt;&lt;/ds:Transform&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; &lt;/ds:Transforms&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;ds:DigestMethod Algorithm="</span><a class="jive-link-external-small" href="http://www.w3.org/2000/09/xmldsig#sha1" target="_blank">http://www.w3.org/2000/09/xmldsig#sha1</a><span>"&gt;&lt;/ds:DigestMethod&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; &lt;ds:DigestValue&gt;YR/fZlwJdw+KbyP24UYiyDv8/Dc=&lt;/ds:DigestValue&gt;</p><p>&#160;&#160;&#160;&#160; &lt;/ds:Reference&gt;</p><p>&#160;&#160;&#160; &lt;/ds:SignedInfo&gt;</p><p>&#160;&#160;&#160; &lt;ds:SignatureValue&gt;</p><p>OZg96GMrGh0cEwbpHwv3KDhFtFcnzPxbwp9Xv0pgw8Mr9+NIjRlg/G1OyIZ3SdcOYqqzF4/TVLDi</p><p>5VclwnjBAFl3SEdkyUbbjXVAGkSsxPQcC4un9UYcecESETlAgV8UrHV3zTrjAWQvDg/YBKveoH90</p><p>FIhfAthslqeFu3h9U20=</p><p>&lt;/ds:SignatureValue&gt;</p><p>&#160;&#160;&#160; &lt;ds:KeyInfo&gt;</p><p><span>&#160;&#160;&#160;&#160; &lt;wsse:SecurityTokenReference xmlns:wsu="</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a><span>" wsu:Id="reference-3-1291739860138-11726490"&gt;</span></p><p><span>&#160;&#160;&#160;&#160;&#160; &lt;wsse:Reference URI="#token-2-1291739860138-12935734" ValueType="</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3</a><span>"&gt;&lt;/wsse:Reference&gt;</span></p><p>&#160;&#160;&#160;&#160; &lt;/wsse:SecurityTokenReference&gt;</p><p>&#160;&#160;&#160; &lt;/ds:KeyInfo&gt;</p><p>&#160;&#160; &lt;/ds:Signature&gt;</p><p>&#160; &lt;/wsse:Security&gt;</p><p> &lt;/env:Header&gt;</p><p><span> &lt;env:Body xmlns:wsu="</span><a class="jive-link-external-small" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a><span>" wsu:Id="element-1-1291739860070-11803898"&gt;</span></p><p><span>&#160; &lt;ns1:addizionami xmlns:ns1="</span><a class="jive-link-external-small" href="http://prova/ejb/to/ws/types" target="_blank">http://prova/ejb/to/ws/types</a><span>"&gt;</span></p><p>&#160;&#160; &lt;Integer_1&gt;3&lt;/Integer_1&gt;</p><p>&#160;&#160; &lt;Integer_2&gt;78&lt;/Integer_2&gt;</p><p>&#160; &lt;/ns1:addizionami&gt;</p><p> &lt;/env:Body&gt;</p><p>&lt;/env:Envelope&gt;</p><p>----------------------------END CANONICAL XML MESSAGE------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>----------------------------CANONICAL XML ELEMENT------------------------</p><p>&lt;wsu:Timestamp wsu:Id="timestamp"&gt;</p><p>&#160;&#160;&#160; &lt;wsu:Created&gt;2010-12-07T16:37:40.038Z&lt;/wsu:Created&gt;</p><p>&#160;&#160; &lt;/wsu:Timestamp&gt;</p><p>----------------------------END CANONICAL XML ELEMENT------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>SHA1(canonical element): '(&lsaquo;&shy;&dagger;&#211;R&#215; C&ograve;&mdash;!X&#230;&#160; &Otilde;&#204;_~'</p><p>Base64(SHA1(canonical element)): 'KIuthtNS1xFD8pchWOYSC9XMX34=' &lt;-- WRONG!! It had to be 'YR/fZlwJdw+KbyP24UYiyDv8/Dc='</p></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/575452#575452">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2047">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>