For Programmers: Free Programming Magazines  


Home > Archive > Java Security > December 2006 > XML signature using JWSDP - problem converting from JDOM









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author XML signature using JWSDP - problem converting from JDOM
lenz1105@gmail.com

2006-12-21, 8:09 am

Hi,

I currently am using the JWSDP's XML-signature library to sign and
validate XML documents. I am able to successfully do this if I build a
DOM document object from an InputStream. However, I also need to
support receiving JDOM documents and converting those to DOM to sign
and validate, as this is what the signature library supports.

The problem is that anytime I convert from JDOM to DOM, my signatures
do not validate. However, when the same signed XML is loaded directly
from an InputStream to DOM it validates. This leads me to believe that
the problem is being caused by the way I am converting from JDOM to
DOM:

DOMOutputter jdomOut = new DOMOutputter;
org.w3c.dom.Document d = jdomOut.output(jdomDoc);

This code is usually the standard example of how to perform the
conversion and relies on the 3rd party APIs, no custom converter, etc.

Has anyone else run into this problem or have other suggestions?

Thanks,

Tony

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com