diff options
author | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-12-08 21:52:29 +0000 |
---|---|---|
committer | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2011-12-08 21:52:29 +0000 |
commit | c85543051b2de8c971619c21f7ccc9b5c4f73985 (patch) | |
tree | ed8b3519dd8be108eb6a56fc4d5c72f7ff00ae86 /sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org | |
parent | 2199d0dc8ee5c8ee3269076112618e953c56e748 (diff) |
Like the binding-ws-runtime-axis2 module, set RELATES_TO as wsa:RelatesTo, relying on Tuscany callback handling.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1212145 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java index cec0b1c6b1..42471411e3 100644 --- a/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java +++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java @@ -350,6 +350,12 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics { // 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 implements Invoker, DataExchangeSemantics { 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 implements Invoker, DataExchangeSemantics { */ 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); |