From 49b093b922f8316caa671a0785d65d9950c43654 Mon Sep 17 00:00:00 2001 From: bdaniel Date: Thu, 26 Aug 2010 16:14:36 +0000 Subject: BJM_4003 Set the "scaOperationName" property on response messages when using default wire format git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@989803 13f79535-47bb-0310-9956-ffa450edef68 --- .../runtime/WireFormatJMSDefaultServiceInterceptor.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java index 731de78cfe..da6f283ff9 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java @@ -22,9 +22,12 @@ import java.util.HashMap; import java.util.List; import javax.jms.BytesMessage; +import javax.jms.JMSException; import javax.jms.Session; import org.apache.tuscany.sca.binding.jms.JMSBinding; +import org.apache.tuscany.sca.binding.jms.JMSBindingConstants; +import org.apache.tuscany.sca.binding.jms.JMSBindingException; import org.apache.tuscany.sca.binding.jms.context.JMSBindingContext; import org.apache.tuscany.sca.binding.jms.provider.DefaultMessageProcessor; import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory; @@ -160,6 +163,15 @@ public class WireFormatJMSDefaultServiceInterceptor implements Interceptor { } } + + try { + responseJMSMsg.setStringProperty(JMSBindingConstants.DEFAULT_OPERATION_PROP_NAME, msg.getOperation().getName()); + } catch (JMSException e) { + // Not sure what to do at this point.. it doesn't make sense to create a fault message. + // Throwing a runtime exception for now. + throw new JMSBindingException(e); + } + msg.setBody(responseJMSMsg); return msg; -- cgit v1.2.3