cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1522631 - in /cxf/trunk: core/src/main/java/org/apache/cxf/interceptor/transform/TransformOutInterceptor.java rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
Date Thu, 12 Sep 2013 15:45:12 GMT
Author: sergeyb
Date: Thu Sep 12 15:45:12 2013
New Revision: 1522631

URL: http://svn.apache.org/r1522631
Log:
[CXF-5276] Updating TransformOutInterceptor to ignore the messages if transform.skip property
is set

Modified:
    cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/transform/TransformOutInterceptor.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java

Modified: cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/transform/TransformOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/transform/TransformOutInterceptor.java?rev=1522631&r1=1522630&r2=1522631&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/transform/TransformOutInterceptor.java
(original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/interceptor/transform/TransformOutInterceptor.java
Thu Sep 12 15:45:12 2013
@@ -44,6 +44,7 @@ public class TransformOutInterceptor ext
     
     private static final String OUTPUT_STREAM_HOLDER = 
         TransformOutInterceptor.class.getName() + ".outputstream";
+    private static final String TRANSFORM_SKIP = "transform.skip";
     private static final StaxOutEndingInterceptor ENDING = new StaxOutEndingInterceptor(OUTPUT_STREAM_HOLDER);
     
     private Map<String, String> outElementsMap;
@@ -85,7 +86,8 @@ public class TransformOutInterceptor ext
             return;
         }
         
-        if (skipOnFault && null != message.getContent(Exception.class)) {
+        if (skipOnFault && null != message.getContent(Exception.class)
+            || MessageUtils.isTrue(message.getContextualProperty(TRANSFORM_SKIP))) {
             return;
         }
         

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java?rev=1522631&r1=1522630&r2=1522631&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
Thu Sep 12 15:45:12 2013
@@ -40,6 +40,7 @@ import org.apache.cxf.service.model.Endp
 public class WSDLGetInterceptor extends AbstractPhaseInterceptor<Message> {
     public static final WSDLGetInterceptor INSTANCE = new WSDLGetInterceptor();
     public static final String DOCUMENT_HOLDER = WSDLGetInterceptor.class.getName() + ".documentHolder";
+    private static final String TRANSFORM_SKIP = "transform.skip";
     private Interceptor<Message> wsdlGetOutInterceptor = WSDLGetOutInterceptor.INSTANCE;
     
     public WSDLGetInterceptor() {
@@ -98,6 +99,7 @@ public class WSDLGetInterceptor extends 
             // notice this is being added after the purge above, don't swap the order!
             mout.getInterceptorChain().add(wsdlGetOutInterceptor);
 
+            message.getExchange().put(TRANSFORM_SKIP, Boolean.TRUE);
             // skip the service executor and goto the end of the chain.
             message.getInterceptorChain().doInterceptStartingAt(
                     message,



Mime
View raw message