Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.PDF - 1.XML
- 2.PDF - 2.XML
- 3.PDF - 3.XML
- etc.
- @Grab('org.apache.camel:camel-core:2.13.0')
- @Grab('org.slf4j:slf4j-simple:1.6.6')
- import org.apache.camel.*
- import org.apache.camel.impl.*
- import org.apache.camel.builder.*
- import org.apache.camel.util.jndi.*
- def jndiContext = new JndiContext();
- def dataDir = "/${System.properties['user.home']}/test/file-poller-demo"
- def camelContext = new DefaultCamelContext(jndiContext)
- camelContext.addRoutes(new RouteBuilder() {
- def void configure() {
- from("file://${dataDir}/in")
- .aggregate(simple('${file:onlyname.noext}')).completionSize(2).groupExchanges()
- .split(body())
- .to("file://${dataDir}/out")
- }
- })
- camelContext.start()
- No body available of type: java.io.InputStream but has value: Exchange[1.xml] of type: org.apache.camel.impl.DefaultExchange on: 1.txt. Caused by: No type converter available to convert from type: org.apache.camel.impl.DefaultExchange to the required type: java.io.InputStream with value Exchange[1.xml]. Exchange[1.txt].
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement