cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1380244 - in /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers: AbstractBindingBuilder.java AsymmetricBindingHandler.java SymmetricBindingHandler.java
Date Mon, 03 Sep 2012 14:24:42 GMT
Author: coheigea
Date: Mon Sep  3 14:24:41 2012
New Revision: 1380244

URL: http://svn.apache.org/viewvc?rev=1380244&view=rev
Log:
Properly log exceptions in the WS-SecurityPolicy layer

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1380244&r1=1380243&r2=1380244&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Mon Sep  3 14:24:41 2012
@@ -286,7 +286,9 @@ public abstract class AbstractBindingBui
                 }
             }
         }
-        throw new PolicyException(reason);
+        if (!assertion.isOptional()) {
+            throw new PolicyException(new Message(reason.getMessage(), LOG));
+        }
     }
     
     protected void policyNotAsserted(Assertion assertion, String reason) {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java?rev=1380244&r1=1380243&r2=1380244&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
Mon Sep  3 14:24:41 2012
@@ -280,7 +280,7 @@ public class AsymmetricBindingHandler ex
                 try {
                     addSupportingTokens(sigParts);
                 } catch (WSSecurityException ex) {
-                    policyNotAsserted(encryptionToken, ex.getMessage());
+                    policyNotAsserted(encryptionToken, ex);
                 }
             } else {
                 addSignatureConfirmation(sigParts);
@@ -438,7 +438,7 @@ public class AsymmetricBindingHandler ex
                     this.addEncryptedKeyElement(encryptedKeyElement);
                     return encr;
                 } catch (WSSecurityException e) {
-                    policyNotAsserted(recToken, e.getMessage());
+                    policyNotAsserted(recToken, e);
                 }    
             }
         }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java?rev=1380244&r1=1380243&r2=1380244&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
Mon Sep  3 14:24:41 2012
@@ -593,7 +593,7 @@ public class SymmetricBindingHandler ext
                     }
                     return encr;
                 } catch (WSSecurityException e) {
-                    policyNotAsserted(recToken, e.getMessage());
+                    policyNotAsserted(recToken, e);
                 }    
             }
         }



Mime
View raw message