Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 43930 invoked from network); 10 Oct 2008 18:26:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2008 18:26:41 -0000 Received: (qmail 17529 invoked by uid 500); 10 Oct 2008 18:26:40 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 17412 invoked by uid 500); 10 Oct 2008 18:26:40 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 17402 invoked by uid 99); 10 Oct 2008 18:26:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2008 11:26:40 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2008 18:25:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 08A5423888AF; Fri, 10 Oct 2008 11:25:50 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r703550 - in /cxf/branches/2.1.x-fixes: ./ rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationOutInterceptor.java Date: Fri, 10 Oct 2008 18:25:49 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081010182550.08A5423888AF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Fri Oct 10 11:25:49 2008 New Revision: 703550 URL: http://svn.apache.org/viewvc?rev=703550&view=rev Log: Merged revisions 703548 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r703548 | dkulp | 2008-10-10 14:22:59 -0400 (Fri, 10 Oct 2008) | 3 lines [CXF-1849] Just log policy issues on outbound. Patch from Fred Dushin applied. ........ Modified: cxf/branches/2.1.x-fixes/ (props changed) cxf/branches/2.1.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationOutInterceptor.java Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Oct 10 11:25:49 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,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513 +/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,691338,691355,691488,691602,691646,691706,691728,692116,692157,692310,692466,692499,693653,693819,694179,694263,694417,694716,694744,694747,694795,694869,694981,694987,694993,695041,695096,695396,695484,695537,695552,695561,695619,695684,695835,695840,695868,695935,695977,696016,696094,696433,696720,697085,697868,698128,699289,700261,700507,700602,700981,701316,701783,701830,701862,702187,702205-702248,702267,702547,702561,702580,702602,702609,702616,702653,702656,702957,703191,703239,703309,703501,703513,703548 Propchange: cxf/branches/2.1.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.1.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationOutInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationOutInterceptor.java?rev=703550&r1=703549&r2=703550&view=diff ============================================================================== --- cxf/branches/2.1.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationOutInterceptor.java (original) +++ cxf/branches/2.1.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyVerificationOutInterceptor.java Fri Oct 10 11:25:49 2008 @@ -63,10 +63,32 @@ if (policy == null) { return; } - - aim.checkEffectivePolicy(policy.getPolicy()); - + + // CXF-1849 Log a message at FINE level if policy verification fails + // on the outbound-server side of a response + try { + aim.checkEffectivePolicy(policy.getPolicy()); + } catch (final PolicyException e) { + if (isOutboundServer(message)) { + LOG.fine("An exception was thrown when verifying that the effective policy for " + + "this request was satisfied. However, this exception will not result in " + + "a fault. The exception raised is: " + + e.toString()); + return; + } else { + throw e; + } + } LOG.fine("Verified policies for outbound message."); } - + + private boolean isOutboundServer(final Message message) { + final Object role = message.get(Message.REQUESTOR_ROLE); + final boolean isClient = + role != null ? Boolean.TRUE.equals(role) : false; + final boolean isOutbound = + message == message.getExchange().getOutMessage() + || message == message.getExchange().getOutFaultMessage(); + return !isClient && isOutbound; + } }