JWSDP XML Signature - problems when converting from JDOM

L

lenz1105

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
 
T

Tomek

(e-mail address removed) napisal(a):
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:

Try to write to file content of DOM document after reading from
InputStream and after converting from JDOM document and see if there
are differences. I can only guess, that it can be problem with
namespaces.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top