Return-Path: X-Original-To: apmail-tuscany-commits-archive@www.apache.org Delivered-To: apmail-tuscany-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D1EF9E13 for ; Thu, 8 Dec 2011 21:52:52 +0000 (UTC) Received: (qmail 50007 invoked by uid 500); 8 Dec 2011 21:52:52 -0000 Delivered-To: apmail-tuscany-commits-archive@tuscany.apache.org Received: (qmail 49978 invoked by uid 500); 8 Dec 2011 21:52:52 -0000 Mailing-List: contact commits-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list commits@tuscany.apache.org Received: (qmail 49969 invoked by uid 99); 8 Dec 2011 21:52:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2011 21:52:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2011 21:52:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 516132388A39 for ; Thu, 8 Dec 2011 21:52:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1212145 - /tuscany/sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java Date: Thu, 08 Dec 2011 21:52:30 -0000 To: commits@tuscany.apache.org From: scottkurz@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111208215230.516132388A39@eris.apache.org> 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);