servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r775054 - in /servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc: CxfBcConsumer.java CxfBcProvider.java
Date Fri, 15 May 2009 07:49:17 GMT
Author: ffang
Date: Fri May 15 07:49:17 2009
New Revision: 775054

URL: http://svn.apache.org/viewvc?rev=775054&view=rev
Log:
[SMXCOMP-542]refactor cxf bc to honor recent changes of cxf dispatch/provider

Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=775054&r1=775053&r2=775054&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Fri May 15 07:49:17 2009
@@ -436,10 +436,6 @@
             if (locationURI != null) {
                 ei.setAddress(locationURI);
             }
-
-            ei.getBinding().setProperty(
-                    AbstractBindingFactory.SMX_DATABINDING_DISABLED, Boolean.TRUE);
-
             cxfService.getInInterceptors().add(new AbstractPhaseInterceptor<Message>(Phase.PRE_PROTOCOL)
{
                 public void handleMessage(Message message) throws Fault {
                     if (!started) {
@@ -515,6 +511,7 @@
                     getBus().getOutFaultInterceptors());
 
             chain = new JbiChainInitiationObserver(ep, getBus());
+            removeDatabindingInterceptprs();
             server = new ServerImpl(getBus(), ep, null, chain);
 
             super.validate();
@@ -525,6 +522,24 @@
         }
     }
 
+    private void removeDatabindingInterceptprs() {
+        for (Interceptor interceptor : ep.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"))
{
+                ep.getBinding().getInInterceptors().remove(interceptor);
+            }
+        }
+        
+        for (Interceptor interceptor : ep.getBinding().getOutInterceptors()) {
+            if (interceptor.getClass().getName().equals("org.apache.cxf.interceptor.WrappedOutInterceptor")
+                || interceptor.getClass().getName().equals("org.apache.cxf.interceptor.BareOutInterceptor"))
{
+                ep.getBinding().getOutInterceptors().remove(interceptor);
+            }
+        }
+    }
+
+    
     private void retrieveWSDL() throws JBIException, WSDLException, DeploymentException,
IOException {
         if (wsdl == null) {
             if (getTargetService() != null && getTargetEndpoint() != null) {

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java?rev=775054&r1=775053&r2=775054&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
Fri May 15 07:49:17 2009
@@ -477,9 +477,7 @@
                 if (endpoint == null) {
                     endpoint = ei.getName().getLocalPart();
                 }
-                ei.getBinding().setProperty(
-                        AbstractBindingFactory.SMX_DATABINDING_DISABLED,
-                        Boolean.TRUE);
+                
 
                 ep = new EndpointImpl(getBus(), cxfService, ei);
 



Mime
View raw message