summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2010-06-18 21:00:50 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2010-06-18 21:00:50 +0000
commit99f951468fdd48de1004614e15595d1a300c4c33 (patch)
treed9478866988a6749a79fd346bc9752a975842b22 /sca-java-2.x
parent42697480a4bc236079ad93d6c003380fd09ed0fa (diff)
Handle the receipt of messageID data from a wsa:MessageID header in an incoming Web service invocation of a bidirectional service, transmit this data to the callback invocation from the service and embed into a wsa:RelatesTo SOAP header in the callback Wen service message, as required by the OASIS Web Service Binding spec, described in TUSCANY-3592
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@956127 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
index d34d9c8638..412481886f 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
@@ -246,6 +246,9 @@ public class JDKInvocationHandler implements InvocationHandler, Serializable {
Message msgContext = ThreadMessageContext.getMessageContext();
+ // Deal with header information that needs to be copied from the message context to the new message...
+ transferMessageHeaders( msg, msgContext);
+
ThreadMessageContext.setMessageContext(msg);
try {
@@ -260,6 +263,17 @@ public class JDKInvocationHandler implements InvocationHandler, Serializable {
ThreadMessageContext.setMessageContext(msgContext);
}
}
+
+ /**
+ * Transfer relevant header information from the old message (incoming) to the new message (outgoing)
+ * @param newMsg
+ * @param oldMsg
+ */
+ private void transferMessageHeaders( Message newMsg, Message oldMsg ) {
+ if( oldMsg == null ) return;
+ // For the present, simply copy all the headers
+ if( !oldMsg.getHeaders().isEmpty() ) newMsg.getHeaders().putAll( oldMsg.getHeaders() );
+ } // end transferMessageHeaders
/**
* @return the callableReference