You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2011/10/17 22:24:33 UTC

svn commit: r1185355 - in /camel/branches/camel-2.8.x: ./ components/camel-cxf/src/main/java/org/apache/camel/component/cxf/ components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/

Author: dkulp
Date: Mon Oct 17 20:24:33 2011
New Revision: 1185355

URL: http://svn.apache.org/viewvc?rev=1185355&view=rev
Log:
Merged revisions 1185335 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1185335 | dkulp | 2011-10-17 15:17:36 -0400 (Mon, 17 Oct 2011) | 1 line
  
  Add some explanations about what's going on.
........

Modified:
    camel/branches/camel-2.8.x/   (props changed)
    camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/HybridSourceDataBinding.java
    camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/HybridSourceDataBinding.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/HybridSourceDataBinding.java?rev=1185355&r1=1185354&r2=1185355&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/HybridSourceDataBinding.java (original)
+++ camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/HybridSourceDataBinding.java Mon Oct 17 20:24:33 2011
@@ -85,6 +85,8 @@ public class HybridSourceDataBinding ext
                     if (obj == null) {
                         return;
                     }
+                    // workaround issue in CXF that is causing these to go through 
+                    // sax instead of stax.  Fixed in 2.4.4/2.5.
                     if (obj instanceof StaxSource
                         || obj instanceof StAXSource) {
                         XMLStreamReader reader = StaxUtils.createXMLStreamReader((Source)obj);

Modified: camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java?rev=1185355&r1=1185354&r2=1185355&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java (original)
+++ camel/branches/camel-2.8.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java Mon Oct 17 20:24:33 2011
@@ -71,8 +71,18 @@ public class PayLoadDataFormatFeature ex
     public void initialize(Client client, Bus bus) {
         removeFaultInInterceptorFromClient(client);
         
+        // Need to remove some interceptors that are incompatible
+        // We don't support JAX-WS Holders for PAYLOAD (not needed anyway)
+        // and thus we need to remove those interceptors to prevent Holder
+        // object from being created and stuck into the contents list
+        // instead of Source objects
         removeInterceptor(client.getEndpoint().getInInterceptors(), 
                           HolderInInterceptor.class);
+        removeInterceptor(client.getEndpoint().getOutInterceptors(), 
+                          HolderOutInterceptor.class);
+        // The SoapHeaderInterceptor maps various headers onto method parameters.
+        // At this point, we expect all the headers to remain as headers, not
+        // part of the body, so we remove that one.
         removeInterceptor(client.getEndpoint().getBinding().getInInterceptors(), 
                           SoapHeaderInterceptor.class);
         client.getEndpoint().getBinding().getInInterceptors().add(new ConfigureDocLitWrapperInterceptor(true));
@@ -83,6 +93,8 @@ public class PayLoadDataFormatFeature ex
     @Override
     public void initialize(Server server, Bus bus) {
         server.getEndpoint().getBinding().getInInterceptors().add(new ConfigureDocLitWrapperInterceptor(true));
+        // Need to remove some interceptors that are incompatible
+        // See above.
         removeInterceptor(server.getEndpoint().getInInterceptors(), 
                           HolderInInterceptor.class);
         removeInterceptor(server.getEndpoint().getOutInterceptors(), 
@@ -98,6 +110,10 @@ public class PayLoadDataFormatFeature ex
     }
     
     private void resetPartTypes(Binding bop2) {
+        // The HypbridSourceDatabinding, based on JAXB, will possibly set
+        // JAXB types into the parts.  Since we need the Source objects,
+        // we'll reset the types to either Source (for streaming), or null
+        // (for non-streaming, defaults to DOMSource.
         for (BindingOperationInfo bop : bop2.getBindingInfo().getOperations()) {
             resetPartTypes(bop);
         }