You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by th...@apache.org on 2011/02/19 14:29:49 UTC
svn commit: r1072324 -
/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/RampartSender.java
Author: thilinamb
Date: Sat Feb 19 13:29:49 2011
New Revision: 1072324
URL: http://svn.apache.org/viewvc?rev=1072324&view=rev
Log:
Applying patch for RAMPART-305 provided by AmilaJ
Modified:
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/RampartSender.java
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/RampartSender.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/RampartSender.java?rev=1072324&r1=1072323&r2=1072324&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/RampartSender.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/RampartSender.java Sat Feb 19 13:29:49 2011
@@ -36,7 +36,7 @@ import org.apache.ws.security.WSSecurity
public class RampartSender implements Handler {
private static Log mlog = LogFactory.getLog(RampartConstants.MESSAGE_LOG);
-
+
private static HandlerDescription EMPTY_HANDLER_METADATA =
new HandlerDescription("default Handler");
@@ -54,10 +54,11 @@ public class RampartSender implements Ha
}
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
-
+
if (!msgContext.isEngaged(WSSHandlerConstants.SECURITY_MODULE_NAME)) {
- return InvocationResponse.CONTINUE;
- }
+ return InvocationResponse.CONTINUE;
+ }
+
MessageBuilder builder = new MessageBuilder();
try {
@@ -67,7 +68,13 @@ public class RampartSender implements Ha
} catch (WSSPolicyException e) {
throw new AxisFault(e.getMessage(), e);
} catch (RampartException e) {
- throw new AxisFault(e.getMessage(), e);
+ // If a framework exception is occurred while processing a security fault
+ // send the original fault to the client.
+ if (msgContext.isProcessingFault()) {
+ return InvocationResponse.CONTINUE;
+ } else {
+ throw new AxisFault(e.getMessage(), e);
+ }
}
if(mlog.isDebugEnabled()){