servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r776519 - in /servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc: CxfBcConsumer.java CxfBcProvider.java
Date Wed, 20 May 2009 01:50:31 GMT
Author: ffang
Date: Wed May 20 01:50:31 2009
New Revision: 776519

URL: http://svn.apache.org/viewvc?rev=776519&view=rev
Log:
[SMXCOMP-542]remove AbstractBindingFactory.DATABINDING_DISABLED dependency when build interceptor
chain

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=776519&r1=776518&r2=776519&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Wed May 20 01:50:31 2009
@@ -49,7 +49,6 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.attachment.AttachmentImpl;
-import org.apache.cxf.binding.AbstractBindingFactory;
 import org.apache.cxf.binding.jbi.JBIFault;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.binding.soap.SoapMessage;
@@ -433,8 +432,6 @@
                 ei.setAddress(locationURI);
             }
 
-            ei.getBinding().setProperty(
-                    AbstractBindingFactory.DATABINDING_DISABLED, Boolean.TRUE);
 
             cxfService.getInInterceptors().add(new MustUnderstandInterceptor());
             cxfService.getInInterceptors().add(new AttachmentInInterceptor());
@@ -505,6 +502,7 @@
                     getBus().getOutFaultInterceptors());
 
             chain = new JbiChainInitiationObserver(ep, getBus());
+            removeUnnecessaryInterceptprs();
             server = new ServerImpl(getBus(), ep, null, chain);
             super.validate();
         } catch (DeploymentException e) {
@@ -514,6 +512,23 @@
         }
     }
 
+    private void removeUnnecessaryInterceptprs() {
+        for (Interceptor interceptor : chain.getEndpoint().getBinding().getInInterceptors())
{
+            if (interceptor.getClass().getName().equals("org.apache.cxf.interceptor.DocLiteralInInterceptor")
+                || interceptor.getClass().getName().equals("org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor")
+                || interceptor.getClass().getName().equals("org.apache.cxf.binding.soap.interceptor.RPCInInterceptor"))
{
+                chain.getEndpoint().getBinding().getInInterceptors().remove(interceptor);
+            }
+        }
+        
+        for (Interceptor interceptor : chain.getEndpoint().getBinding().getOutInterceptors())
{
+            if (interceptor.getClass().getName().equals("org.apache.cxf.interceptor.WrappedOutInterceptor")
+                || interceptor.getClass().getName().equals("org.apache.cxf.interceptor.BareOutInterceptor"))
{
+                chain.getEndpoint().getBinding().getOutInterceptors().remove(interceptor);
+            }
+        }
+    }
+
     private void retrieveWSDL() throws JBIException, WSDLException,
             DeploymentException, IOException {
         if (wsdl == null) {

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java?rev=776519&r1=776518&r2=776519&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
Wed May 20 01:50:31 2009
@@ -49,7 +49,6 @@
 import com.ibm.wsdl.Constants;
 
 import org.apache.cxf.Bus;
-import org.apache.cxf.binding.AbstractBindingFactory;
 
 import org.apache.cxf.binding.jbi.JBIConstants;
 import org.apache.cxf.binding.jbi.JBIFault;
@@ -544,9 +543,7 @@
                 if (endpoint == null) {
                     endpoint = ei.getName().getLocalPart();
                 }
-                ei.getBinding().setProperty(
-                        AbstractBindingFactory.DATABINDING_DISABLED,
-                        Boolean.TRUE);
+                
 
                 ep = new EndpointImpl(getBus(), cxfService, ei);
 
@@ -563,7 +560,7 @@
                 CxfBcProviderMessageObserver obs = new CxfBcProviderMessageObserver(
                         this);
                 conduit.setMessageObserver(obs);
-
+                
                 checkWSRMInterceptors();
                           
 



Mime
View raw message