Hi Ruwan,
On 9/4/06, Ruwan Linton <[EMAIL PROTECTED]> wrote:
Hi Ruchith,
Yes of course, but I have several concerns.
1. I am going to use this digest value for caching stuff, and if the digest
value generation time takes more time than invoking the method itself then
it is useless. Since we need to convert OMElement to DOM in this approach
(C14N) it will have some performance drawbacks I guess.
Hmm... DOOM is same as OM ... and it has all properties of OM in
addition to the DOM behaviour... maybe the additional conversion step
using the stax events from the partially read soap env and the
incoming stream might be a bit of an overhead.
2. How about comments, my implementation of DOMHASH (That's the normal
behaviour of DOMHASH as well) dosent take comments in to account, which is
required for checking the equality of two OMNodes, for caching.
Well .. you can do C14N ignoring comments:
Document doc =
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse("/path/to/your/xml");
byte[] out = Canonicalizer.getInstance(
Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS).canonicalizeSubtree(doc.getDocumentElement());
3. I dont know weather I am right or wrong here (I dont have a deep
understanding of C14N), but it takes namespace declarations in to account
and we need to neglect namespace declarations and subtitue the namespace URI
instead.
Good point ... Agreed !
In the case where two XML elements carries different prefixes in
namespace declarations we cannot use C14N to compare.
Thanks,
Ruchith
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]