I am running into an issue with XSLT signing and need an expert help in resolving the issue.
I just did quite R&D on XML digital signature for JDOM and am following the below steps.
1)Convert an XML file into JDOM
2)Convert JDOM into DOM
3)To set the namespace aware true so that XSLT signature works.
Store the w3c DOM to an inputstream tho' outputstream as follows
org.apache.xml.security.utils.XMLUtils.outputDOMc14nWithComments(docSign, os);
4)Then set the namespace aware and parse the w3c DOM stored in an inputstream.
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
5)singed the DOM after setting namespace aware true.
I am getting the following error when i parse the DOM that is in the inputstream which was converted from JDOM
[Fatal Error] :-1:-1: Premature end of file.
can any expert guide me the right way to resolve the issue/to implement signing for JDOM.
Note : The URI signing works in this way not the XSLT signing.