summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2011-03-29 20:47:44 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2011-03-29 20:47:44 +0000
commit1a2fe860fa6f790b95a0ea5978ee7f1a40c06c0c (patch)
treeeae5d4a0024557122a76fb1159516638e576e5ea
parent4d09109a945cfaf83817e3a64ab9c5275a3dd540 (diff)
TUSCANY-3822: call PolicyHandler.afterInvoke() with outbound MessageContext containing response message
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1086734 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-java-1.x/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java5
-rw-r--r--sca-java-1.x/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java6
-rw-r--r--sca-java-1.x/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java5
3 files changed, 13 insertions, 3 deletions
diff --git a/sca-java-1.x/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java b/sca-java-1.x/trunk/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/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInMessageReceiver.java
+++ b/sca-java-1.x/trunk/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/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java b/sca-java-1.x/trunk/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/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceInOutSyncMessageReceiver.java
+++ b/sca-java-1.x/trunk/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/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java b/sca-java-1.x/trunk/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/trunk/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java
+++ b/sca-java-1.x/trunk/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;
}