ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <>
Subject [jira] [Commented] (WSS-605) Ensure the ws-security-dom can work with the saaj impl in latest Java9 EA kit
Date Fri, 07 Apr 2017 04:19:41 GMT


Freeman Fang commented on WSS-605:

Figured out the tests in wss4j use the javax.xml.parsers.DocumentBuilderFactory to build the
Dom document, so no SAAJ MessageFactory used, that's why  we can't see the problem here which
occurred in CXF when build with java9.

I just add SamlTokenActionTest#testAssertionActionWithSAAJ which is based on SamlTokenActionTest#testAssertionAction
but use SAAJ MessageFactory instead to create the SOAPPart and let WSS4J handler to process
the message which can cause same error as we saw in CXF, 
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than
the one that created it.

To see the error, just edit the new WSSecurityUtil.getDomElement method in my patch, "return
node;" directly no matter which saaj impl is used.
Please see the new appended WSS-605-new6.patch.


> Ensure the ws-security-dom can work with the saaj impl in latest Java9 EA kit
> -----------------------------------------------------------------------------
>                 Key: WSS-605
>                 URL:
>             Project: WSS4J
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Colm O hEigeartaigh
>             Fix For: 2.2.0
>         Attachments: WSS-605-new2.patch, WSS-605-new3.patch, WSS-605-new4.patch, WSS-605-new5.patch,
WSS-605-new.patch, WSS-605.patch
> In latest JDK9 EA kit, the SAAJ api changed, for example, the
> com.sun.xml.internal.messaging.saaj.soap.impl.ElementImpl now not extends its dom counterpart, instead it store it as a field and add
a method
> {code}
>     public Element getDomElement() {
>         return element;
>     }
> {code}
> to get it. so the extends become aggregates.
> This change cause lots of ClassCastException and wrong DocOwner exception which use ws-seucrity-dom
which rely on the Dom and Saaj api heavily.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message