Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JWSDP XML Signature - problems when converting from JDOM

Reply
Thread Tools

JWSDP XML Signature - problems when converting from JDOM

 
 
lenz1105@gmail.com
Guest
Posts: n/a
 
      12-21-2006
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

 
Reply With Quote
 
 
 
 
Tomek
Guest
Posts: n/a
 
      12-21-2006

http://www.velocityreviews.com/forums/(E-Mail 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Netbeans 5.5 & JWSDP 2 with .xml.bind import problems Andy Java 1 04-05-2006 10:11 AM
java.lang.NoSuchMethodError: org.jdom.Element: method getParent()Lorg/jdom/Element Tinker Java 4 10-09-2005 03:12 PM
JDOM: java.lang.NoClassDefFoundError: org/jdom/Content Bernd Oninger Java 4 06-21-2004 09:08 PM
JDOM: java.lang.NoClassDefFoundError: org/jdom/Content Bernd Oninger XML 3 06-21-2004 09:08 PM
Help with JDOM, turn org.jdom.Document -> org.w3c.dom.Document? Wendy S Java 1 08-04-2003 11:48 PM



Advertisments