I'd recommend the Camel in Action book - it gives an example of what I think 
you are trying to achieve and you will have a template to build out from

 
On 29 Mar 2011, at 19:56, jpalmer1026 wrote:

> Hi,
> 
> I'm a Camel newbie and I'm trying to run a simple example to demonstrate how
> to use Camel with Spring. I'm currently using Camel 2.7.0 with Spring 3.0.5.
> When I run the code via the MainSpring class (see below), nothing happens.
> Any ideas? 
> 
> My spring-config.xml is as follows:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> My FileTransferLogger class is as follows:
> 
> import org.apache.camel.Exchange;
> import org.apache.camel.Processor;
> 
> import java.util.Date;
> 
> public class FileTransferLogger implements Processor {
>    public void process(Exchange exchange) throws Exception {
>        System.out.println("Transferring " +
> exchange.getIn().getHeader("CamelFileName") + " at " + new Date());
>    }
> }
> 
> My main class is as follows:
> 
> import org.springframework.context.support.ClassPathXmlApplicationContext;
> 
> public class MainSpring {
>    public static void main(String[] args) throws Exception {
>        new ClassPathXmlApplicationContext("spring-config.xml");
>    }
> }
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Using-Camel-with-Spring-tp4269926p4269926.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to