cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r774637 - in /cxf/trunk: maven-plugins/archetypes/cxf-http-basic/ maven-plugins/eclipse-plugin-generator/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/core/src/main/java/org/apache/cxf/binding/ tools/anttask/ tools/eclipse...
Date Thu, 14 May 2009 05:20:29 GMT
Author: ffang
Date: Thu May 14 05:20:29 2009
New Revision: 774637

URL: http://svn.apache.org/viewvc?rev=774637&view=rev
Log:
[CXF-2217] add SMX_DATABINDING_DISABLED for AbstractBindingFactory so that to add proper interceptors
for endpoint used in smx-cxf binding component

Added:
    cxf/trunk/maven-plugins/archetypes/cxf-http-basic/
    cxf/trunk/maven-plugins/eclipse-plugin-generator/
    cxf/trunk/tools/anttask/
    cxf/trunk/tools/eclipse-plugin/
Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=774637&r1=774636&r2=774637&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Thu May 14 05:20:29 2009
@@ -354,45 +354,48 @@
 
         sb.getOutFaultInterceptors().add(new StaxOutInterceptor());
         sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
+        
+        if (!Boolean.TRUE.equals(binding.getProperty(SMX_DATABINDING_DISABLED))) {
 
-        sb.getInInterceptors().add(new AttachmentInInterceptor());
-        sb.getInInterceptors().add(new StaxInInterceptor());
-        sb.getInInterceptors().add(new SoapActionInInterceptor());
+            sb.getInInterceptors().add(new AttachmentInInterceptor());
+            sb.getInInterceptors().add(new StaxInInterceptor());
+            sb.getInInterceptors().add(new SoapActionInInterceptor());
         
-        sb.getOutInterceptors().add(new AttachmentOutInterceptor());
-        sb.getOutInterceptors().add(new StaxOutInterceptor());
-        sb.getOutInterceptors().add(new SoapHeaderOutFilterInterceptor());
-
-        if (SoapBindingConstants.BINDING_STYLE_RPC.equalsIgnoreCase(bindingStyle)) {
-            sb.getInInterceptors().add(new RPCInInterceptor());
-            sb.getOutInterceptors().add(new RPCOutInterceptor());
-        } else if (SoapBindingConstants.BINDING_STYLE_DOC.equalsIgnoreCase(bindingStyle)
+            sb.getOutInterceptors().add(new AttachmentOutInterceptor());
+            sb.getOutInterceptors().add(new StaxOutInterceptor());
+            sb.getOutInterceptors().add(new SoapHeaderOutFilterInterceptor());
+
+            if (SoapBindingConstants.BINDING_STYLE_RPC.equalsIgnoreCase(bindingStyle)) {
+                sb.getInInterceptors().add(new RPCInInterceptor());
+                sb.getOutInterceptors().add(new RPCOutInterceptor());
+            } else if (SoapBindingConstants.BINDING_STYLE_DOC.equalsIgnoreCase(bindingStyle)
                         && SoapBindingConstants.PARAMETER_STYLE_BARE.equalsIgnoreCase(parameterStyle))
{
-            //sb.getInInterceptors().add(new BareInInterceptor());
-            sb.getInInterceptors().add(new DocLiteralInInterceptor());
-            if (hasWrapped) {
-                sb.getOutInterceptors().add(new WrappedOutInterceptor());               
    
+                //sb.getInInterceptors().add(new BareInInterceptor());
+                sb.getInInterceptors().add(new DocLiteralInInterceptor());
+                if (hasWrapped) {
+                    sb.getOutInterceptors().add(new WrappedOutInterceptor());           
        
+                }
+                sb.getOutInterceptors().add(new BareOutInterceptor());
+            } else {
+                //sb.getInInterceptors().add(new WrappedInInterceptor());
+                sb.getInInterceptors().add(new DocLiteralInInterceptor());
+                sb.getOutInterceptors().add(new WrappedOutInterceptor());
+                sb.getOutInterceptors().add(new BareOutInterceptor());
             }
-            sb.getOutInterceptors().add(new BareOutInterceptor());
-        } else {
-            //sb.getInInterceptors().add(new WrappedInInterceptor());
-            sb.getInInterceptors().add(new DocLiteralInInterceptor());
-            sb.getOutInterceptors().add(new WrappedOutInterceptor());
-            sb.getOutInterceptors().add(new BareOutInterceptor());
-        }
-        sb.getInInterceptors().add(new SoapHeaderInterceptor());
-
-        sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus()));
-        sb.getInInterceptors().add(new CheckFaultInterceptor());
-        sb.getInInterceptors().add(new MustUnderstandInterceptor());
-        sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
-        sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
-        sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
-
-        // REVISIT: The phase interceptor chain seems to freak out if this added
-        // first. Not sure what the deal is at the moment, I suspect the
-        // ordering algorithm needs to be improved
-        sb.getInInterceptors().add(new URIMappingInterceptor());
+            sb.getInInterceptors().add(new SoapHeaderInterceptor());
+            
+            sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus()));
+            sb.getInInterceptors().add(new CheckFaultInterceptor());
+            sb.getInInterceptors().add(new MustUnderstandInterceptor());
+            sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
+            sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
+            sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
+
+            // REVISIT: The phase interceptor chain seems to freak out if this added
+            //first. Not sure what the deal is at the moment, I suspect the
+            //ordering algorithm needs to be improved
+            sb.getInInterceptors().add(new URIMappingInterceptor());
+        }
 
         if (version.getVersion() == 1.1) {
             sb.getInFaultInterceptors().add(new Soap11FaultInInterceptor());

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java?rev=774637&r1=774636&r2=774637&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java Thu
May 14 05:20:29 2009
@@ -47,6 +47,8 @@
 
 public abstract class AbstractBindingFactory implements BindingFactory, WSDLBindingFactory
{
 
+    public static final String SMX_DATABINDING_DISABLED = "smx.databinding.disabled";
+    
     protected Collection<String> activationNamespaces;
 
     protected Bus bus;



Mime
View raw message