JWSDP XML Signature - problems when converting from JDOM

Discussion in 'Java' started by lenz1105@gmail.com, Dec 21, 2006.

  1. Guest

    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
    , Dec 21, 2006
    #1
    1. Advertising

  2. Tomek Guest

    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.
    Tomek, Dec 21, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wendy S
    Replies:
    1
    Views:
    6,351
    Darren Davison
    Aug 5, 2003
  2. Bernd Oninger
    Replies:
    4
    Views:
    12,247
    GIMME
    Jun 21, 2004
  3. Tinker
    Replies:
    4
    Views:
    5,286
    Harry Bosch
    Oct 9, 2005
  4. Andy
    Replies:
    1
    Views:
    1,229
  5. Bernd Oninger
    Replies:
    3
    Views:
    2,871
    GIMME
    Jun 21, 2004
Loading...

Share This Page