You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2017/02/15 14:12:33 UTC
svn commit: r1783106 -
/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java
Author: coheigea
Date: Wed Feb 15 14:12:33 2017
New Revision: 1783106
URL: http://svn.apache.org/viewvc?rev=1783106&view=rev
Log:
WSS-598 - Finished MTOM work
Modified:
webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java
Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java?rev=1783106&r1=1783105&r2=1783106&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/Encryptor.java Wed Feb 15 14:12:33 2017
@@ -143,12 +143,7 @@ public class Encryptor {
// If so then replace the existing Element to encrypt in the SOAP Envelope
encrElement.getParentNode().replaceChild(matchingElement, encrElement);
encrElement = matchingElement;
- }
-
- if (encrElement == elementToEncrypt) {
- // Here we didn't find an already expanded Element, so inline the attachment bytes
- WSSecurityUtil.inlineAttachments(includeElements, attachmentCallbackHandler, true);
- } else {
+
// We already have an expanded Element, but might need to delete the attachments
for (Element includeElement : includeElements) {
String xopURI = includeElement.getAttributeNS(null, "href");
@@ -165,6 +160,9 @@ public class Encryptor {
}
}
}
+ } else {
+ // Here we didn't find an already expanded Element, so inline the attachment bytes
+ WSSecurityUtil.inlineAttachments(includeElements, attachmentCallbackHandler, true);
}
}