cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1373240 - in /cxf/trunk: api/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java
Date Wed, 15 Aug 2012 07:19:03 GMT
Author: ffang
Date: Wed Aug 15 07:19:03 2012
New Revision: 1373240

URL: http://svn.apache.org/viewvc?rev=1373240&view=rev
Log:
[CXF-4475]LoggingInInterceptor throws when pretty printing MTOM messages

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
    cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java?rev=1373240&r1=1373239&r2=1373240&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/AbstractLoggingInterceptor.java
Wed Aug 15 07:19:03 2012
@@ -148,7 +148,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/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java?rev=1373240&r1=1373239&r2=1373240&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java
(original)
+++ cxf/trunk/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/MTOMTest.java
Wed Aug 15 07:19:03 2012
@@ -69,7 +69,7 @@ public class MTOMTest extends AbstractBu
         }
     }
     
-    @Logging
+    @Logging(pretty = true)
     @WebService
     @MTOM(threshold = 1)
     public interface MTOMService {



Mime
View raw message