ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colm O hEigeartaigh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WSS-605) Ensure the ws-security-dom can work with the saaj impl in latest Java9 EA kit
Date Fri, 31 Mar 2017 08:53:41 GMT

    [ https://issues.apache.org/jira/browse/WSS-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15950554#comment-15950554
] 

Colm O hEigeartaigh commented on WSS-605:
-----------------------------------------

Thanks [~ffang]. Could you create a new method in WSSecurityUtil (cloneElement or something)
and put the new logic in there instead of duplicating it? e.g.

Element clonedElement = (Element)keyInfo.getElement().cloneNode(true);
+        if (System.getProperty("java.version").startsWith("9")) {
+            // here we need regiter the javax.xml.soap.Node with new instance
+            clonedElement = (Element)doc.importNode(clonedElement, true);
+            clonedElement = (Element)WSSecurityUtil.getDomElement(clonedElement);
+        }

getDomElement could then be private

> Ensure the ws-security-dom can work with the saaj impl in latest Java9 EA kit
> -----------------------------------------------------------------------------
>
>                 Key: WSS-605
>                 URL: https://issues.apache.org/jira/browse/WSS-605
>             Project: WSS4J
>          Issue Type: Improvement
>            Reporter: Freeman Fang
>            Assignee: Colm O hEigeartaigh
>         Attachments: 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
com.sun.org.apache.xerces.internal.dom.ElementNSImpl, 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
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message