I'm trying to get a message from http (jetty) and save it to a file but it 
never works, the file is never created.

Here's my routing code:

public void configure()
{
    Processor proc = new Processor() {
        public void process(Exchange e) throws Exception
        {
         getLog().info("Headers: " + e.getIn().getHeaders());
         System.out.println("Received exchange: " + 
e.getIn().getBody(String.class));
        }
    };

    
from("jetty:http://localhost:8080/hello";).process(proc).setHeader(FileComponent.HEADER_FILE_NAME,
        constant("message.txt")).to("file:target/hello?noop=true");

}

I'm expecting target/hello/message.txt but only target/hello is created. Also 
the file endpoint seems to be polling that folder like it is a consumer!

Patrick

Reply via email to