diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-31 19:48:59 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-31 19:48:59 +0000 |
commit | 90de79537616a706fa6f9ca2bb87744abd2dee2a (patch) | |
tree | 634051da926acfe36e99410e6e84f5db787d9249 /sca-java-1.x/branches/sca-java-1.6.2/modules | |
parent | 02508ecec9c4c6a7ce88b58dc86fe06b5a9d3891 (diff) |
TUSCANY-3822: call PolicyHandler.afterInvoke() with outbound MessageContext containing response message
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1087424 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.6.2/modules')
3 files changed, 13 insertions, 3 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java b/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java index a0cfab9154..ab96cc371f 100644 --- a/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java +++ b/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java @@ -65,6 +65,11 @@ public class Axis2ServiceInMessageReceiver extends AbstractInMessageReceiver { } */ + // TUSCANY-3822: moved afterInvoke() call from Axis2ServiceProvider + for ( PolicyHandler policyHandler : policyHandlerList ) { + policyHandler.afterInvoke(null, inMC); + } + } catch (InvocationTargetException e) { Throwable t = e.getCause(); if (t instanceof Exception) { diff --git a/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java b/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java index d467e0b3c8..e5635da44f 100644 --- a/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java +++ b/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java @@ -80,6 +80,12 @@ public class Axis2ServiceInOutSyncMessageReceiver extends AbstractInOutSyncMessa soapEnvelope.getBody().addChild(responseOM); } outMC.setEnvelope(soapEnvelope); + + // TUSCANY-3822: moved afterInvoke() call from Axis2ServiceProvider + for ( PolicyHandler policyHandler : policyHandlerList ) { + policyHandler.afterInvoke(responseOM, outMC); + } + outMC.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN, Constants.VALUE_TRUE); } catch (InvocationTargetException e) { diff --git a/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java b/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java index 456001e615..29d0cdb818 100644 --- a/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java +++ b/sca-java-1.x/branches/sca-java-1.6.2/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java @@ -765,9 +765,8 @@ public class Axis2ServiceProvider { RuntimeWire wire = ((RuntimeComponentService)contract).getRuntimeWire(getBinding()); Object response = wire.invoke(op, msg); - for ( PolicyHandler policyHandler : policyHandlerList ) { - policyHandler.afterInvoke(response, inMC); - } + // TUSCANY-3822: moved afterInvoke() call to Axis2ServiceInOutSyncMessageReceiver + // and Axis2ServiceInMessageReceiver return response; } |