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.

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.

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.

BTW, I have done the implementation and I think it is good to use something
in AXIOM rather than using some other (performance)

Thanks,
Ruwan.

On 9/4/06, Ruchith Fernando <[EMAIL PROTECTED]> wrote:

Hi Ruwan,

If you are looking to compare two semantically equal XML elements how
about using C14N and then calculating the digest C14Ned XML. If you
convert the OMElement to DOOM then you can use the C14N implementation
available in XML-Security for this.

Thanks,
Ruchith

On 9/4/06, Ruwan Linton <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This is regarding the Jira,
>
> Key: WSCOMMONS-82
> URL: http://issues.apache.org/jira/browse/WSCOMMONS-82
>
> I am going to add the DOMHASH implementation to the AXIOM. The domhash
> algorithm is a digest generation algorithm that gives a unique digest
value
> for a given XML node. This is required to compare two XML nodes for the
XML
> content equality.
>
> I am in the process of implementing a caching module for the Axis2 and
it is
> required to keep the digest value of the SOAP request OM representation
with
> the output SOAP response, so that if a request with the same digest
value
> arises again I can simply send the Response without re calculating that.
In
> order to do so, I need to have a good mechanism which dosent count
comments
> and various namespace declarations in generating the digest value.
>
> I cant use any of the existing XML comparing mechanisms like XMLUnit
since
> all those takes comments also in to account. So I have implemented the
> DOMHASH algorithm in the axiom-api, I have added this functionality
through
> a helper class since I have realized that changing the api is not
effective.
> The helper class is availabal as the patch.txt and the class is in the '
> org.apache.axiom.om.util.DigestGenerator'. You can get the digest value
by
> calling the getDigest method by giving the OMNode or OMDocument  and the
> digest algorithm (MD5 or SHA1).
>
> Thanks,
> Ruwan.
>
>


--
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to