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