Posted by franknatoli
on November 15, 2007 at 9:28 AM PST
Need to generate an enveloped signature on one branch of an XML file that I am building in memory courtesy of JAXB objects. The JWSDP 2.0 sample GenEnveloped.java works great, but its call to the XMLSignatureFactory newReference method uses a first argument of "", which implies the entire document, not a particular branch. And its call to the DocumentBuilderFactory newDocumentBuilder parse method uses an argument of a FileInputStream, i.e., an existing disk file, not an in memory document.
Can an enveloped signature be created for an in memory document, that does not [yet] exist on the disk? If so, are there any source examples of such a construct?
Are there any source examples of referencing a particular branch of an XML file?
Many thanks for any help.