reta commented on code in PR #3753:
URL: https://github.com/apache/cxf/pull/3753#discussion_r4646640138


##########
rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java:
##########
@@ -85,6 +88,14 @@ private static void 
retrieveAndSetPayload(org.apache.cxf.message.Message inMessa
                                               Message message,
                                               boolean allowObjectMessage)
         throws UnsupportedEncodingException, JMSException {
+        if (message instanceof StreamMessage && !allowObjectMessage) {
+            // Do not read the body: StreamMessage.readObject() may 
deserialize provider-specific
+            // object values. Report the message as an unsupported format 
instead, so that the
+            // SOAP/JMS binding can reply with an unsupportedJMSMessageFormat 
fault.
+            inMessage.setContent(InputStream.class, new 
ByteArrayInputStream(new byte[0]));

Review Comment:
   Hm.. should we through here?
   
   ```
   throw new JMSException("StreamMessage is disabled by configuration");
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to