cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r692500 - in /cxf/branches/2.1.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Date Fri, 05 Sep 2008 17:51:15 GMT
Author: dkulp
Date: Fri Sep  5 10:51:14 2008
New Revision: 692500

URL: http://svn.apache.org/viewvc?rev=692500&view=rev
Log:
Merged revisions 692499 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r692499 | dkulp | 2008-09-05 13:48:52 -0400 (Fri, 05 Sep 2008) | 3 lines
  
  Don't put the logging interceptor on the fault in as the normal in takes care of it before
it's known to be a fault.
  If the soap message is a fault and the security stuff wasn't found, let the fault propogate.
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java
    cxf/branches/2.1.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep  5 10:51:14 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691355,691488,691602,691646,691706,691728,692116,692157,692466
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910,687914,688086,688102,688133,688596,688735,688870,689572,689596,689855,689924,690067,690289,691246,691271,691295,691355,691488,691602,691646,691706,691728,692116,692157,692466,692499

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java?rev=692500&r1=692499&r2=692500&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java
Fri Sep  5 10:51:14 2008
@@ -49,14 +49,12 @@
     protected void initializeProvider(InterceptorProvider provider, Bus bus) {
         if (limit == DEFAULT_LIMIT) {
             provider.getInInterceptors().add(IN);
-            provider.getInFaultInterceptors().add(IN);
             provider.getOutInterceptors().add(OUT);
             provider.getOutFaultInterceptors().add(OUT);
         } else {
             LoggingInInterceptor in = new LoggingInInterceptor(limit);
             LoggingOutInterceptor out = new LoggingOutInterceptor(limit);
             provider.getInInterceptors().add(in);
-            provider.getInFaultInterceptors().add(in);
             provider.getOutInterceptors().add(out);
             provider.getOutFaultInterceptors().add(out);
         }

Modified: cxf/branches/2.1.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=692500&r1=692499&r2=692500&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Fri Sep  5 10:51:14 2008
@@ -98,12 +98,17 @@
         }
     }
 
-    public void handleMessage(SoapMessage msg) throws Fault {
+    private SOAPMessage getSOAPMessage(SoapMessage msg) {
         SOAPMessage doc = msg.getContent(SOAPMessage.class);
         if (doc == null) {
             saajIn.handleMessage(msg);
             doc = msg.getContent(SOAPMessage.class);
         }
+        return doc;
+    }
+    
+    public void handleMessage(SoapMessage msg) throws Fault {
+        SOAPMessage doc = getSOAPMessage(msg);
         
         boolean doDebug = LOG.isLoggable(Level.FINE);
         boolean doTimeLog = TIME_LOG.isLoggable(Level.FINE);
@@ -165,6 +170,10 @@
             if (wsResult == null) { // no security header found
                 if (doAction == WSConstants.NO_SECURITY) {
                     return;
+                } else if (doc.getSOAPPart().getEnvelope().getBody().hasFault()) {
+                    LOG.warning("Request does not contain required Security header, " 
+                                + "but it's a fault.");
+                    return;
                 } else {
                     LOG.warning("Request does not contain required Security header");
                     throw new WSSecurityException(WSSecurityException.INVALID_SECURITY);



Mime
View raw message