svn commit: r563822 - /activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r563822 - /activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java

jstrachan-2
Author: jstrachan
Date: Wed Aug  8 04:55:31 2007
New Revision: 563822

URL: http://svn.apache.org/viewvc?view=rev&rev=563822
Log:
added the comment from Willem: http://www.nabble.com/Re%3A-Proposal-for-the-CXF-and-Camel-integration-p12050433s22882.html

Modified:
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java?view=diff&rev=563822&r1=563821&r2=563822
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java (original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java Wed Aug  8 04:55:31 2007
@@ -16,19 +16,18 @@
  */
 package org.apache.camel.component.cxf;
 
-import java.io.InputStream;
-import java.util.Set;
-
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 
+import java.io.InputStream;
+import java.util.Set;
+
 /**
  * The binding of how Camel messages get mapped to Apache CXF and back again
  *
  * @version $Revision$
  */
 public class CxfBinding {
-
     public Object extractBodyFromCxf(CxfExchange exchange, Message message) {
         //  TODO how do we choose a format?
         return getBody(message);
@@ -48,7 +47,10 @@
     public MessageImpl createCxfMessage(CxfExchange exchange) {
         MessageImpl answer = (MessageImpl) exchange.getInMessage();
 
-        // TODO is InputStream the best type to give to CXF?
+        // CXF uses the stax which is based on the stream API to parser the XML, so
+        // the CXF transport is also based on the stream API.
+        // And the interceptors are also based on the stream API,
+        // so lets use an InputStream to host the CXF on wire message.
         CxfMessage in = exchange.getIn();
         Object body = in.getBody(InputStream.class);
         if (body == null) {