Uploaded image for project: 'WSS4J'
  1. WSS4J
  2. WSS-283

ClassCastException when signing message with existing WSSE header containing Text as first child

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.6.1
    • WSS4J Handlers
    • None

    Description

      WSSecSignature doesn't expect that a text node might be the first child of securityHeader...

      Will submit a patch.

      org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is:
      java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredTextImpl cannot be cast to org.w3c.dom.Element
      at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:515)
      at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:442)
      at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:348)
      ...
      Caused by: java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredTextImpl cannot be cast to org.w3c.dom.Element
      at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:487)
      ... 24 more

      Attachments

        1. wss-283.patch
          1 kB
          Anli Shundi

        Activity

          People

            coheigea Colm O hEigeartaigh
            ashundi Anli Shundi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: