camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r644684 - /activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/
Date Fri, 04 Apr 2008 11:53:05 GMT
Author: ningjiang
Date: Fri Apr  4 04:52:49 2008
New Revision: 644684

URL: http://svn.apache.org/viewvc?rev=644684&view=rev
Log:
CAMEL-436 patch applied with thank to Glen

Modified:
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/AsyncProcessorDecorator.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBinding.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapBinding.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapConsumer.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapProducer.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java
    activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/AsyncProcessorDecorator.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/AsyncProcessorDecorator.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/AsyncProcessorDecorator.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/AsyncProcessorDecorator.java
Fri Apr  4 04:52:49 2008
@@ -25,7 +25,7 @@
 
 /**
  * A simple class to wrap an existing processor (synchronous or asynchronous)
- * with two synchronous processor that will be executed before and after the
+ * with two synchronous processors that will be executed before and after the
  * main processor.
  */
 public class AsyncProcessorDecorator implements AsyncProcessor {

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CamelInvoker.java
Fri Apr  4 04:52:49 2008
@@ -46,7 +46,7 @@
 
     /**
     * This method is called when the incoming message is to
-    * be passed into the camel processor. The return value is the response
+    * be passed into the Camel processor. The return value is the response
     * from the processor
     */
     public void invoke(Exchange exchange) {
@@ -62,7 +62,7 @@
             throw new Fault(ex);
         }
 
-        // make sure the client has return back the message
+        // make sure the client has returned back the message
         copybackExchange(cxfExchange, exchange);
 
         Message outMessage = exchange.getOutMessage();

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?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- 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
Fri Apr  4 04:52:49 2008
@@ -23,7 +23,7 @@
 import org.apache.cxf.message.Message;
 
 /**
- * The binding of how Camel messages get mapped to Apache CXF and back again
+ * The binding/mapping of Camel messages to Apache CXF and back again
  *
  * @version $Revision$
  */
@@ -49,11 +49,10 @@
     public Message createCxfMessage(CxfExchange exchange) {
         Message answer = exchange.getInMessage();
 
-        // 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.
+        // CXF uses StAX which is based on the stream API to parse 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.
+        // so let's use an InputStream to host the CXF on wire message.
 
         CxfMessage in = exchange.getIn();
         Object body = in.getBody(InputStream.class);
@@ -64,7 +63,7 @@
             answer.setContent(InputStream.class, body);
             // we need copy context
         } else if (body instanceof List) {
-            // just set the operation's parament
+            // just set the operation's parameter
             answer.setContent(List.class, body);
             // just set the method name
             answer.put(CxfConstants.OPERATION_NAME, (String)in.getHeader(CxfConstants.OPERATION_NAME));

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
Fri Apr  4 04:52:49 2008
@@ -40,7 +40,7 @@
 
     @Override
     protected Endpoint<CxfExchange> createEndpoint(String uri, String remaining, Map
parameters) throws Exception {
-        // now we need to add the address, endpoint name, wsdl url or the SEI to build up
a endpoint
+        // Now we need to add the address, endpoint name, WSDL url or the SEI to build up
an endpoint
         CxfEndpoint result = new CxfEndpoint(uri, remaining, this);
         setProperties(result, parameters);
         // we can check the endpoint integration here

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
Fri Apr  4 04:52:49 2008
@@ -24,7 +24,7 @@
 public interface CxfConstants {
     String METHOD = "method";
     String SERVICE_CLASS = "serviceClass";
-    String DATA_FORMATE = "dataFormat";
+    String DATA_FORMAT = "dataFormat";
     String WSDL_URL = "wsdlURL";
     String ADDRESS = "address";
     String SERVICE_NAME = "serviceName";
@@ -36,7 +36,7 @@
     String CAMEL_TRANSPORT_PREFIX = "camel:";
     String CXF_EXCHANGE = "org.apache.cxf.message.exchange";
     String CAMEL_EXCHANGE = "org.apache.camel.exchange";
-
 }
+
 
 

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java
Fri Apr  4 04:52:49 2008
@@ -68,7 +68,7 @@
                 svrBean.setEndpointName(cxfEndpointBean.getEndpointName());
             }
 
-        } else { // setup the serverFactoryBean with the URI paraments
+        } else { // setup the serverFactoryBean with the URI parameters
             Class serviceClass = ClassLoaderUtils.loadClass(endpoint.getServiceClass(), this.getClass());
             svrBean = CxfEndpointUtils.getServerFactoryBean(serviceClass);
             isWebServiceProvider = CxfEndpointUtils.hasAnnotation(serviceClass, WebServiceProvider.class);
@@ -88,7 +88,7 @@
 
         svrBean.setInvoker(new CamelInvoker(this));
 
-        // apply the feature here
+        // apply feature here
         if (!dataFormat.equals(DataFormat.POJO) && !isWebServiceProvider) {
             List<AbstractFeature> features = new ArrayList<AbstractFeature>();
 
@@ -96,8 +96,7 @@
                 features.add(new PayLoadDataFormatFeature());
                 // adding the logging feature here for debug
                 //features.add(new LoggingFeature());
-            }
-            if (dataFormat.equals(DataFormat.MESSAGE)) {
+            } else if (dataFormat.equals(DataFormat.MESSAGE)) {
                 features.add(new MessageDataFormatFeature());
                 //features.add(new LoggingFeature());
             }

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
Fri Apr  4 04:52:49 2008
@@ -54,7 +54,7 @@
         this.address = address;
         if (address.startsWith(CxfConstants.SPRING_CONTEXT_ENDPOINT)) {
             isSpringContextEndpoint = true;
-            //get the bean from spring context
+            // Get the bean from the Spring context
             beanId = address.substring(CxfConstants.SPRING_CONTEXT_ENDPOINT.length());
             if (beanId.startsWith("//")) {
                 beanId = beanId.substring(2);

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfExchange.java
Fri Apr  4 04:52:49 2008
@@ -25,7 +25,7 @@
 import org.apache.cxf.transport.Destination;
 
 /**
- * An {@link Exchange} for working with Apache CXF which expoes the underlying
+ * An {@link Exchange} for working with Apache CXF which exposes the underlying
  * CXF messages via {@link #getInMessage()} and {@link #getOutMessage()} along with the
  * {@link #getExchange()}
  *

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
Fri Apr  4 04:52:49 2008
@@ -65,7 +65,7 @@
         if (dataFormat.equals(DataFormat.POJO)) {
             client = createClientFormClientFactoryBean(null);
         } else {
-            // create CxfClient for message
+            // Create CxfClient for message
             client = createClientForStreamMessge();
         }
     }
@@ -92,8 +92,7 @@
         if (dataFormat.equals(DataFormat.MESSAGE)) {
             features.add(new MessageDataFormatFeature());
             // features.add(new LoggingFeature());
-        }
-        if (dataFormat.equals(DataFormat.PAYLOAD)) {
+        } else if (dataFormat.equals(DataFormat.PAYLOAD)) {
             features.add(new PayLoadDataFormatFeature());
             // features.add(new LoggingFeature());
         }
@@ -102,7 +101,7 @@
         return createClientFormClientFactoryBean(cfb);
     }
 
-    // If cfb is null ,we will try to find a right cfb to use.
+    // If cfb is null, we will try to find the right cfb to use.
     private Client createClientFormClientFactoryBean(ClientFactoryBean cfb) throws CamelException
{
         Bus bus = BusFactory.getDefaultBus();
         if (endpoint.isSpringContextEndpoint()) {
@@ -121,7 +120,7 @@
         } else { // set up the clientFactoryBean by using URI information
             if (null != endpoint.getServiceClass()) {
                 try {
-                    // we need to choice the right front end to create the
+                    // We need to choose the right front end to create the
                     // clientFactoryBean
                     Class serviceClass = ClassLoaderUtils.loadClass(endpoint.getServiceClass(),
this
                         .getClass());
@@ -145,9 +144,8 @@
                 if (null != endpoint.getWsdlURL()) {
                     cfb.setWsdlURL(endpoint.getWsdlURL());
                 } else {
-                    // throw the exception for insufficiency of the endpoint
-                    // info
-                    throw new CamelException("Insufficiency of the endpoint info");
+                    // Throw an exception indicating insufficient endpoint info
+                    throw new CamelException("Not enough information to create a CXF endpoint.
(Provide WSDL url or service class name.)");
                 }
             }
             if (endpoint.getServiceName() != null) {

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapBinding.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapBinding.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapBinding.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapBinding.java
Fri Apr  4 04:52:49 2008
@@ -27,7 +27,7 @@
     private CxfSoapBinding() {
 
     }
-    //TODO using the type converter to do this kind of thing
+    //TODO use the type converter to do this kind of thing
     public static org.apache.cxf.message.Message getCxfInMessage(org.apache.camel.Exchange
exchange, boolean isClient) {
         MessageImpl answer = new MessageImpl();
         org.apache.cxf.message.Exchange cxfExchange = exchange.getProperty(CxfConstants.CXF_EXCHANGE,

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapConsumer.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapConsumer.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapConsumer.java
Fri Apr  4 04:52:49 2008
@@ -37,7 +37,7 @@
 import org.apache.cxf.transport.MessageObserver;
 
 /**
- * A CXF based soap consumer.
+ * A CXF based SOAP consumer (client).
  * The consumer will delegate to another endpoint for the transport layer
  * and will provide SOAP support on top of it.
  */
@@ -115,8 +115,8 @@
     protected void processSoapConsumerOut(Exchange exchange) throws Exception {
         LOG.info("processSoapConsumerOut: " + exchange);
 
-        // TODO check if the message is oneway message
-        // Get the method name form the soap endpoint
+        // TODO check if the message is one-way message
+        // Get the method name from the soap endpoint
         org.apache.cxf.message.Message outMessage = CxfSoapBinding.getCxfOutMessage(exchange,
false);
         org.apache.cxf.message.Exchange cxfExchange = outMessage.getExchange();
         InterceptorChain chain = OutgoingChainInterceptor.getOutInterceptorChain(cxfExchange);

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapProducer.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapProducer.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSoapProducer.java
Fri Apr  4 04:52:49 2008
@@ -72,7 +72,7 @@
                     }
                 });
 
-        //create the endpoint and setup the intercepters
+        //create the endpoint and setup the interceptors
         Class sei = CxfEndpointUtils.getSEIClass(endpoint.getServiceClass());
         ClientFactoryBean cfb = CxfEndpointUtils.getClientFactoryBean(sei);
         if (sei == null) {

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DataFormat.java
Fri Apr  4 04:52:49 2008
@@ -17,8 +17,8 @@
 package org.apache.camel.component.cxf;
 
 /**
- * The data format the user expoects to see at the camel cxf components.  It can be
- * configured as a property (DataFormat) in the Camel cxf endpoint.
+ * The data format the user expects to see at the Camel CXF components.  It can be
+ * configured as a property (DataFormat) in the Camel CXF endpoint.
  */
 public enum DataFormat {
 

Modified: activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java?rev=644684&r1=644683&r2=644684&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java
(original)
+++ activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/MessageInvoker.java
Fri Apr  4 04:52:49 2008
@@ -28,7 +28,7 @@
      * This method is called when the incoming message is to be passed into the
      * camel processor. The return value is the response from the processor
      *
-     * @param exchange the cxf exchange which holds the in and out message
+     * @param exchange the CXF exchange which holds the in and out message
      */
     void invoke(Exchange exchange);
 



Mime
View raw message