cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject cxf git commit: [CXF-7344] Also support CXF Content-Type as valid jms property
Date Tue, 09 May 2017 15:30:17 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 3e18bc283 -> ed512e646


[CXF-7344] Also support CXF Content-Type as valid jms property


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ed512e64
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ed512e64
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ed512e64

Branch: refs/heads/master
Commit: ed512e646cfac342bdc2b6df117e9a81eacf4061
Parents: 3e18bc2
Author: Christian Schneider <chris@die-schneider.net>
Authored: Tue May 9 16:26:57 2017 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Tue May 9 16:30:22 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/transport/jms/JMSConstants.java  | 2 ++
 .../java/org/apache/cxf/transport/jms/JMSMessageHeadersType.java  | 3 +++
 .../main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java   | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ed512e64/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
index 63fe389..c981630 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConstants.java
@@ -74,6 +74,8 @@ public final class JMSConstants {
     public static final String JMS_MESSAGE_TYPE = "JMSMessageType";
     public static final String TARGET_SERVICE_IN_REQUESTURI = "target.service.inrequesturi";
     public static final String MALFORMED_REQUESTURI = "malformed.requesturi";
+    
+    public static final String RS_CONTENT_TYPE = "org.apache.cxf.jms.rs.ContentType";
 
     private JMSConstants() {
         //utility class

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed512e64/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageHeadersType.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageHeadersType.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageHeadersType.java
index 51499ec..17a2a51 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageHeadersType.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageHeadersType.java
@@ -321,6 +321,9 @@ public class JMSMessageHeadersType {
             contentType = (String)getProperty(JMSSpecConstants.CONTENTTYPE_FIELD);
         }
         if (contentType == null) {
+            contentType = (String)getProperty(JMSConstants.RS_CONTENT_TYPE);
+        }
+        if (contentType == null) {
             contentType = (String)getProperty(org.apache.cxf.message.Message.CONTENT_TYPE);
         }
         return contentType;

http://git-wip-us.apache.org/repos/asf/cxf/blob/ed512e64/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
index d599294..f7c8e7e 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
@@ -254,7 +254,7 @@ final class JMSMessageUtils {
             }
             addJMSPropertyFromMessage(messageHeaders,
                                       outMessage,
-                                      org.apache.cxf.message.Message.CONTENT_TYPE);
+                                      JMSConstants.RS_CONTENT_TYPE);
         }
         if (headers != null) {
             for (Map.Entry<String, List<String>> ent : headers.entrySet()) {


Mime
View raw message