Author: scottkurz
Date: Thu Dec 8 21:52:29 2011
New Revision: 1212145
URL: http://svn.apache.org/viewvc?rev=1212145&view=rev
Log:
Like the binding-ws-runtime-axis2 module, set RELATES_TO as wsa:RelatesTo,
relying on Tuscany callback handling.
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java?rev=1212145&r1=1212144&r2=1212145&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
(original)
+++
tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java
Thu Dec 8 21:52:29 2011
@@ -350,6 +350,12 @@ public class JAXWSBindingInvoker impleme
// add WS-Addressing header for the invocation of a bidirectional
// service
// FIXME: is there any way to use the Axis2 addressing support for
this?
+ //
+ // IIUC, this 'if (callbackEndpoint != null)' will be true if:
+ // 1) This is a bidirectional interface
+ // AND
+ // 2) We are invoking in the forward direction of the bidirectional
interface.
+ //
if (callbackEndpoint != null) {
// // Load the actual callback endpoint URI into an Axis EPR ready
// to form the content of the wsa:From header
@@ -376,6 +382,11 @@ public class JAXWSBindingInvoker impleme
String toAddress = getToAddress(msg);
// requestMC.setTo( new EndpointReference(toAddress) );
+ // IIUC, this 'if (callbackEndpoint != null)' will be true if:
+ // 1) This is a bidirectional interface
+ // AND
+ // 2) We are invoking in the callback direction of the
bidirectional interface.
+ //
if (isInvocationForCallback(msg)) {
addWSAToHeader(sh, toAddress, msg);
addWSARefParms(sh, msg);
@@ -490,7 +501,11 @@ public class JAXWSBindingInvoker impleme
*/
private void addWSARelatesTo(SOAPHeader sh, Message msg) throws
SOAPException {
- String idValue = (String)msg.getHeaders().get(Constants.MESSAGE_ID);
+ //
+ // Note that the 'core' (loosely speaking) part of the invocation
chain
+ // will have already copied the forward message msgId to the
RELATES_TO header.
+ //
+ String idValue = (String)msg.getHeaders().get(Constants.RELATES_TO);
if (idValue != null) {
SOAPHeaderElement relatesToH =
sh.addHeaderElement(QNAME_WSA_RELATESTO);
relatesToH.addAttribute(new QName(null, "RelationshipType"),
SCA_CALLBACK_REL);