camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Shea" <patr...@ps1.net>
Subject from jetty to file
Date Thu, 20 Dec 2007 22:26:03 GMT
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


Mime
View raw message