Author: edwardsmj
Date: Fri Jun 18 21:00:50 2010
New Revision: 956127
URL: http://svn.apache.org/viewvc?rev=956127&view=rev
Log:
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
Modified:
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
Modified:
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java?rev=956127&r1=956126&r2=956127&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
Fri Jun 18 21:00:50 2010
@@ -246,6 +246,9 @@ public class JDKInvocationHandler implem
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 implem
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