Hi
Damm we have a candidate for a blocker. See CAMEL-713.
Voting: -1
Basically if your exchanges are Out capable - eg InOut then you can not route
to a file producer and expect it to save a file, instead it will do the
opposite and try to consume!
I had this route:
private static OutputReportIncident OK = new OutputReportIncident();
OK.setCode("OK");
from("cxf:bean:reportIncident")
.convertBodyTo(InputReportIncident.class)
.to("velocity://MailResponse.vm")
.to("seda:mails")
.transform(constant(OK));
from("seda:mails")
.to("file:target/mails");
}
That didn't save the content from the velocity generation to a file. It doesn't
matter if I have the "seda" included or not.
The exchange is from CXF that is InOut capable and therefore we have the issue
with CAMEL-713.
To summarize. This unit test does not work as expected in Camel 1.4:
public class FileMEPInOutTest extends ContextTestSupport {
public void testMEPInOutTest() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(1);
mock.expectedBodiesReceived("Hello World");
// request is InOut
template.requestBodyAndHeader("direct:in", "Hello World",
FileComponent.HEADER_FILE_NAME,
"FileMEPInOutTest.txt");
// give Camel time to create the file
Thread.sleep(1000);
File file = new File("target/FileMEPInOutTest.txt");
file = file.getAbsoluteFile();
assertEquals("Hello World", IOConverter.toString(file));
mock.assertIsSatisfied();
}
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("direct:in")
.to("file://target/?append=false")
.to("mock:result");
}
};
}
}
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Hadrian Zbarcea [mailto:[EMAIL PROTECTED]
Sent: 12. juli 2008 05:03
To: [email protected]
Subject: [VOTE] Release apache-camel-1.4
This is a vote to release camel 1.4
A new Camel 1.4 is ready. Another fantastic community effort with 231
issues fixed.
Many thanks for all the hard work!
The staging area is at:
http://people.apache.org/~hadrian/apache-camel-1.4.0-RC3/maven2
The tarballs are here:
http://people.apache.org/~hadrian/apache-camel-1.4.0-RC3/maven2/org/apache/camel/apache-camel/1.4.0/
Please vote to approve this release binary. The vote will be open for
at least 72 hours.
[ ] +1 Release the binary as Apache Camel 1.4.0
[ ] -1 Veto the release (provide specific comments)
Here's my +1
Hadrian