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;
+ }
}