ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1690102 - in /webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom: processor/SignatureProcessor.java util/WSSecurityUtil.java
Date Thu, 09 Jul 2015 13:31:02 GMT
Author: coheigea
Date: Thu Jul  9 13:31:01 2015
New Revision: 1690102

URL: http://svn.apache.org/r1690102
Log:
Fix for attachment issue


Conflicts:
	ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java

Modified:
    webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
    webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java?rev=1690102&r1=1690101&r2=1690102&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
Thu Jul  9 13:31:01 2015
@@ -480,10 +480,10 @@ public class SignatureProcessor implemen
                     WSSecurityUtil.storeElementInContext(context, element);
                 }
             }
-            if (element != null && data.isExpandXopIncludeForSignature()) {
+            if (element != null && data.isExpandXopIncludeForSignature() &&
element.getFirstChild() != null) {
                 // Look for xop:Include Nodes
                 List<Element> includeElements = 
-                    WSSecurityUtil.findElements(element, "Include", WSConstants.XOP_NS);
+                    WSSecurityUtil.findElements(element.getFirstChild(), "Include", WSConstants.XOP_NS);
                 for (Element includeElement : includeElements) {
                     String xopURI = includeElement.getAttributeNS(null, "href");
                     if (xopURI != null) {

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java?rev=1690102&r1=1690101&r2=1690102&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
Thu Jul  9 13:31:01 2015
@@ -1241,7 +1241,7 @@ public final class WSSecurityUtil {
                 || !attachmentId.equals(attachments.get(0).getId())) {
                 throw new WSSecurityException(
                     WSSecurityException.ErrorCode.INVALID_SECURITY,
-                    "empty", new Object[] {"Attachment not found"}
+                    "empty", new Object[] {"Attachment not found: " + xopUri}
                 );
             }
             Attachment attachment = attachments.get(0);



Mime
View raw message