diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-14 14:54:03 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-14 14:54:03 +0000 |
commit | ee8d2b72e816783c5632ae3608bc93ad69165435 (patch) | |
tree | bae8ed9dd4f9e9567fc8bb0752036eea1eabb266 | |
parent | f04913e8cefaf78e4ae3a783118a95e13a450c68 (diff) |
TUSCANY-3788 - Put some more info back into the response message based on what's stored in the response invoker
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1059028 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java index 652f67f5e1..43e34c1173 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java @@ -76,7 +76,9 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab * If you have a Tuscany message you can call this
*/
public void invokeAsyncResponse(Message responseMessage) {
- responseMessage.getHeaders().put("ASYNC_RESPONSE_INVOKER", this);
+ responseMessage.getHeaders().put(Constants.ASYNC_RESPONSE_INVOKER, this);
+ responseMessage.getHeaders().put(Constants.RELATES_TO, relatesToMsgID);
+
if ((requestEndpoint.getBindingProvider() instanceof EndpointAsyncProvider) &&
(((EndpointAsyncProvider)requestEndpoint.getBindingProvider()).supportsNativeAsync())){
// process the response as a native async response
@@ -114,6 +116,12 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab Message msg = messageFactory.createMessage();
msg.setOperation(getOperation());
+
+ // on the the following will be null depending
+ // on whether this is native or non-native async
+ msg.setTo(requestEndpoint);
+ msg.setFrom(responseEndpointReference);
+
if( args instanceof Throwable ) {
msg.setFaultBody(args);
} else {
|