Author: davsclaus Date: Wed Aug 31 09:33:14 2011 New Revision: 1163553 URL: http://svn.apache.org/viewvc?rev=1163553&view=rev Log: Polished. Fixed CS.
Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java?rev=1163553&r1=1163552&r2=1163553&view=diff ============================================================================== --- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java (original) +++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java Wed Aug 31 09:33:14 2011 @@ -17,7 +17,6 @@ package org.apache.camel.component.cxf; import java.lang.reflect.Proxy; -import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; @@ -34,13 +33,11 @@ import org.apache.camel.CamelException; import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; -import org.apache.camel.RuntimeCamelException; import org.apache.camel.Service; import org.apache.camel.component.cxf.common.header.CxfHeaderFilterStrategy; import org.apache.camel.component.cxf.common.message.CxfConstants; import org.apache.camel.component.cxf.feature.MessageDataFormatFeature; import org.apache.camel.component.cxf.feature.PayLoadDataFormatFeature; -import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.impl.DefaultEndpoint; import org.apache.camel.impl.SynchronousDelegateProducer; import org.apache.camel.spi.HeaderFilterStrategy; @@ -144,6 +141,7 @@ public class CxfEndpoint extends Default super(remaining); setAddress(remaining); } + public CxfEndpoint() { super(); } @@ -509,12 +507,12 @@ public class CxfEndpoint extends Default protected String resolvePropertyPlaceholders(String str) { try { if (getCamelContext() != null) { - return ((DefaultCamelContext)getCamelContext()).resolvePropertyPlaceholders(str); + return getCamelContext().resolvePropertyPlaceholders(str); } else { return str; } } catch (Exception ex) { - throw new RuntimeCamelException(ex); + throw ObjectHelper.wrapRuntimeCamelException(ex); } } @@ -710,7 +708,8 @@ public class CxfEndpoint extends Default this, this.properties); } catch (Throwable e) { - e.printStackTrace(); + // TODO: Why dont't we rethrown this exception + LOG.warn("Error setting CamelContext. This exception will be ignored.", e); } } } @@ -730,7 +729,8 @@ public class CxfEndpoint extends Default this, this.properties); } catch (Throwable e) { - e.printStackTrace(); + // TODO: Why dont't we rethrown this exception + LOG.warn("Error setting properties. This exception will be ignored.", e); } } } @@ -788,9 +788,9 @@ public class CxfEndpoint extends Default @Override protected void setParameters(Object[] params, Message message) { - Object attachements = message.get(CxfConstants.CAMEL_CXF_ATTACHMENTS); - if (attachements != null) { - message.setAttachments((Collection<Attachment>) attachements); + Object attachments = message.get(CxfConstants.CAMEL_CXF_ATTACHMENTS); + if (attachments != null) { + message.setAttachments((Collection<Attachment>) attachments); message.remove(CxfConstants.CAMEL_CXF_ATTACHMENTS); } @@ -811,7 +811,7 @@ public class CxfEndpoint extends Default } if (content.size() < elements.size()) { - LOG.warn("Cannot set right payload paremeters. Please check the BindingOperation and PayLoadMessage."); + LOG.warn("Cannot set right payload parameters. Please check the BindingOperation and PayLoadMessage."); throw new IllegalArgumentException( "The PayLoad elements cannot fit with the message parts of the BindingOperation. Please check the BindingOperation and PayLoadMessage."); } @@ -862,6 +862,7 @@ public class CxfEndpoint extends Default public void setFeatures(List<AbstractFeature> f) { features = f; } + public List<AbstractFeature> getFeatures() { return features; } @@ -869,6 +870,7 @@ public class CxfEndpoint extends Default public void setHandlers(List<Handler> h) { handlers = h; } + public List<Handler> getHandlers() { return handlers; } @@ -876,6 +878,7 @@ public class CxfEndpoint extends Default public void setSchemaLocations(List<String> sc) { schemaLocations = sc; } + public List<String> getSchemaLocations() { return schemaLocations; }