Author: ffang
Date: Thu Aug 16 03:39:21 2012
New Revision: 1373723

URL: http://svn.apache.org/viewvc?rev=1373723&view=rev
Log:
Merged revisions 1373720 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1373720 | ffang | 2012-08-16 11:28:11 +0800 (四, 16  8 2012) | 1 line
  
  [CXF-4475]LoggingInInterceptor throws when pretty printing MTOM messages
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
    
cxf/branches/2.4.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.5.x-fixes:r1373720

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: 
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java?rev=1373723&r1=1373722&r2=1373723&view=diff
==============================================================================
--- 
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
 (original)
+++ 
cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
 Thu Aug 16 03:39:21 2012
@@ -103,7 +103,8 @@ public abstract class AbstractLoggingInt
                                 String encoding, String contentType) 
         throws Exception {
         // Just transform the XML message when the cos has content
-        if (isPrettyLogging() && (contentType != null && 
contentType.indexOf("xml") >= 0) && cos.size() > 0) {
+        if (isPrettyLogging() && (contentType != null && 
contentType.indexOf("xml") >= 0 
+            && contentType.toLowerCase().indexOf("multipart/related") < 0) && 
cos.size() > 0) {
             Transformer serializer = XMLUtils.newTransformer(2);
             // Setup indenting to "pretty print"
             serializer.setOutputProperty(OutputKeys.INDENT, "yes");

Modified: 
cxf/branches/2.4.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java?rev=1373723&r1=1373722&r2=1373723&view=diff
==============================================================================
--- 
cxf/branches/2.4.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java
 (original)
+++ 
cxf/branches/2.4.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java
 Thu Aug 16 03:39:21 2012
@@ -69,7 +69,7 @@ public class MTOMTest extends AbstractBu
         }
     }
     
-    @Logging
+    @Logging(pretty = true)
     @WebService
     @MTOM(threshold = 1)
     public interface MTOMService {


Reply via email to