summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
authorscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-12-07 22:40:37 +0000
committerscottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68>2011-12-07 22:40:37 +0000
commit734d45a9e6ea5f8b703e27e9222562438954d069 (patch)
tree25f57e0b7baea065b5004af854fe86d272f3e80b /sca-java-2.x
parentead65459c590e57fe838627ef11d1a2050715efd (diff)
Add <wsa:MessageID> to ref-side messages for 2-way operation on forward interface of callback.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1211684 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-jaxws/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/JAXWSBindingInvoker.java13
1 files changed, 12 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 57262cb96f..19d2f72c27 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
@@ -23,6 +23,7 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.UUID;
import javax.wsdl.Binding;
import javax.wsdl.BindingOperation;
@@ -81,6 +82,7 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics {
public static final String WSA_FINAL_NAMESPACE = "http://www.w3.org/2005/08/addressing";
public static final QName QNAME_WSA_ADDRESS = new QName(WSA_FINAL_NAMESPACE, "Address", "wsa");
public static final QName QNAME_WSA_FROM = new QName(WSA_FINAL_NAMESPACE, "From", "wsa");
+ public static final QName QNAME_WSA_MESSAGEID = new QName(WSA_FINAL_NAMESPACE, "MessageID", "wsa");
public static final QName QNAME_WSA_TO = new QName(WSA_FINAL_NAMESPACE, "To", "wsa");
public static final QName QNAME_WSA_ACTION = new QName(WSA_FINAL_NAMESPACE, "Action", "wsa");
public static final QName QNAME_WSA_RELATESTO = new QName(WSA_FINAL_NAMESPACE, "RelatesTo", "wsa");
@@ -361,7 +363,16 @@ public class JAXWSBindingInvoker implements Invoker, DataExchangeSemantics {
addWSAActionHeader(sh, action);
- // requestMC.setFrom(fromEPR);
+ // We need a wsa:MessageId for request-response operation per WS-Addressing core specification, (and Axis2 will choke if addressing module is enabled.)
+ if (!operation.isNonBlocking()) {
+ String messageId = (String)msg.getHeaders().get(Constants.MESSAGE_ID);
+ if (messageId == null) {
+ messageId = UUID.randomUUID().toString();
+ }
+ SOAPHeaderElement msgIdHeader = sh.addHeaderElement(QNAME_WSA_MESSAGEID);
+ msgIdHeader.setTextContent(messageId);
+ }
+
} // end if
String toAddress = getToAddress(msg);