I'm trying to do the canonicalization part of XML. However, I don't know how to connect to Apache.
I have download the package: http://www.apache.org/dyn/closer.lua/santuario/java-library/2_0_8/xmlsec-2.0.8-source-release.zip But adding it to the project doesn't work. How do I do that?
This is not working:
public byte[] canonicalize(byte[] data) throws Exception {
byte[] result = null;
try {
org.apache.xml.security.Init.init();
Canonicalizer c14n = Canonicalizer.getInstance("http://www.w3.org/TR/2001/REC-xml-c14n-20010315");
result = c14n.canonicalize(data);
} catch (Exception e) {
System.out.println("False");
}
return result;
}