cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r797581 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Date Fri, 24 Jul 2009 17:59:06 GMT
Author: dkulp
Date: Fri Jul 24 17:59:06 2009
New Revision: 797581

URL: http://svn.apache.org/viewvc?rev=797581&view=rev
Log:
[CXF-2356] Make sure the wss4j processing is only done once for faults

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=797581&r1=797580&r2=797581&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Fri Jul 24 17:59:06 2009
@@ -81,6 +81,8 @@
     public static final String PRINCIPAL_RESULT = "wss4j.principal.result";
     public static final String PROCESSOR_MAP = "wss4j.processor.map";
 
+    private static final String SECURITY_PROCESSED = WSS4JInInterceptor.class.getName() +
".DONE";
+    
     private static final Logger LOG = LogUtils.getL7dLogger(WSS4JInInterceptor.class);
     private static final Logger TIME_LOG = LogUtils.getL7dLogger(WSS4JInInterceptor.class,
                                                                  null,
@@ -142,6 +144,10 @@
     }
     
     public void handleMessage(SoapMessage msg) throws Fault {
+        if (msg.containsKey(SECURITY_PROCESSED)) {
+            return;
+        }
+        msg.put(SECURITY_PROCESSED, Boolean.TRUE);
         SOAPMessage doc = getSOAPMessage(msg);
         
         boolean doDebug = LOG.isLoggable(Level.FINE);



Mime
View raw message