You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Sam (Stephen Samuel)" <sa...@gmail.com> on 2012/03/28 08:16:19 UTC
FTP Polling errors
Hi all,
I'm getting exceptions on the FTP consumer, which I'm not worried about in
itself, but it seems to stop the FTP from polling.
Any ideas on how I can have camel ignore such errors and keep polling ?
[Camel (camel-1) thread #2 - ftp://ecb03ec2.otherhosting.net] WARN
RemoteFilePollingConsumerPollStrategy.rollback - Consumer FtpConsumer[
ftp://ecb0xxxxx?include=crml.*.xml&move=.done&password=******&username=opta]
could not poll endpoint: Endpoint[
ftp://exxxxxxxxxt?include=crml.*.xml&move=.done&password=******&username=opta]
caused by: File operation failed: 150 Here comes the directory listing.
Cannot change directory to: /. Code: 150
org.apache.camel.component.file.GenericFileOperationFailedException: File
operation failed: 150 Here comes the directory listing.
Cannot change directory to: /. Code: 150
at
org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:628)
at
org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:591)
at
org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:53)
at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:100)
at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:140)
at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
[Camel (camel-1) thread #6 - seda://scorecardPublisher] ERROR
GenericFileOnCompletion.error - Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot rename file: GenericFile[crml-33934.xml] to:
GenericFile[//.done/crml-33934.xml]]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
rename file: GenericFile[crml-33934.xml] to:
GenericFile[//.done/crml-33934.xml]
at
org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:98)
at
org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:86)
at
org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:132)
at
org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:82)
at
org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:53)
at
org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:56)
at
org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:222)
at
org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:199)
at
org.apache.camel.processor.UnitOfWorkProcessor.access$000(UnitOfWorkProcessor.java:37)
at
org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:157)
at
org.apache.camel.processor.RouteContextProcessor$1.done(RouteContextProcessor.java:56)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:106)
at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
at
org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:260)
at
org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:172)
at
org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:131)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
On Wed, Mar 28, 2012 at 07:14, Christian Müller <christian.mueller@gmail.com
> wrote:
> What we do in this case is:
>
> enrich("direct:step1", firstAggregationStrategy)
> enrich("direct:step2", secondAggregationStrategy)
> ...
>
> from("direct:step1")
> .convertBodyTo(Foo.class)
> .to("cxf:...");
>
> from("direct:step2")
> .convertBodyTo(Bar.class)
> .to("cxf:...");
>
> We implemented custom type converter [1] for the converter logic. But you
> can also use (custom) data formats to transform from/to the types you
> need...
>
> [1] http://camel.apache.org/type-converter.html
>
> Best,
> Christian
>
> On Wed, Mar 28, 2012 at 12:19 AM, GPRSLyons <GP...@gmail.com> wrote:
>
> > Gents-
> >
> > As always, thanks for the help.
> >
> > In my route, it is very simple for me to convert the payload to JSON...
> >
> > .unmarshal().gzip()
> > .unmarshal().json(JsonLibrary.Jackson, MyClass.class)
> >
> > However, I would like to enrich my content from multiple sources, such
> > as...
> >
> > .loop(SOURCES.length)
> > .enrich("source", new MyAggregationStrategy())
> > .end
> >
> > Is there a way to apply that same conversion before the
> AggregationStrategy
> > is called? Working with byte arrays within the AggregationStrategy is
> > becoming very complex. I tried using the TypeConverter within the
> > MyAggregationStrategy, but it is challenging to determine how to
> replicate
> > the unmarshalling calls I make within the route in the same manner in the
> > AggregationStrategy :(
> >
> > -Shan
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Enrichment-and-Type-Conversion-tp5599040p5599040.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
--
-Sam
Re: FTP Polling errors
Posted by "Sam (Stephen Samuel)" <sa...@gmail.com>.
Thanks for the tips. It's odd that it works 9 times out of 10 but then will
give me that exception and no further files (for that consumer) will be
consumed. The other 4 consumers on the same FTP endpoint (each scan for
different types of files) continue to work.
On Wed, Mar 28, 2012 at 07:30, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Maybe try setting stepwise=false.
>
> See more details at
> http://camel.apache.org/ftp2
>
> And it seems your FTP server dont like changing directory to the user
> root directory (eg /).
> Also mind if the server is unix or windows. There is a separator
> option to explicit configure that.
>
> On Wed, Mar 28, 2012 at 8:16 AM, Sam (Stephen Samuel)
> <sa...@gmail.com> wrote:
> > Hi all,
> >
> > I'm getting exceptions on the FTP consumer, which I'm not worried about
> in
> > itself, but it seems to stop the FTP from polling.
> >
> > Any ideas on how I can have camel ignore such errors and keep polling ?
> >
> > [Camel (camel-1) thread #2 - ftp://ecb03ec2.otherhosting.net] WARN
> > RemoteFilePollingConsumerPollStrategy.rollback - Consumer FtpConsumer[
> >
> ftp://ecb0xxxxx?include=crml.*.xml&move=.done&password=******&username=opta
> ]
> > could not poll endpoint: Endpoint[
> >
> ftp://exxxxxxxxxt?include=crml.*.xml&move=.done&password=******&username=opta
> ]
> > caused by: File operation failed: 150 Here comes the directory listing.
> > Cannot change directory to: /. Code: 150
> > org.apache.camel.component.file.GenericFileOperationFailedException: File
> > operation failed: 150 Here comes the directory listing.
> > Cannot change directory to: /. Code: 150
> > at
> >
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:628)
> > at
> >
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:591)
> > at
> >
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:53)
> > at
> >
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:100)
> > at
> >
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:140)
> > at
> >
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)
> > at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> > at
> >
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> > at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> > at
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> > at
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
> > at
> >
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> > [Camel (camel-1) thread #6 - seda://scorecardPublisher] ERROR
> > GenericFileOnCompletion.error - Caused by:
> > [org.apache.camel.component.file.GenericFileOperationFailedException -
> > Cannot rename file: GenericFile[crml-33934.xml] to:
> > GenericFile[//.done/crml-33934.xml]]
> > org.apache.camel.component.file.GenericFileOperationFailedException:
> Cannot
> > rename file: GenericFile[crml-33934.xml] to:
> > GenericFile[//.done/crml-33934.xml]
> > at
> >
> org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:98)
> > at
> >
> org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:86)
> > at
> >
> org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:132)
> > at
> >
> org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:82)
> > at
> >
> org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:53)
> > at
> >
> org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:56)
> > at
> > org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:222)
> > at
> >
> org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:199)
> > at
> >
> org.apache.camel.processor.UnitOfWorkProcessor.access$000(UnitOfWorkProcessor.java:37)
> > at
> >
> org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:157)
> > at
> >
> org.apache.camel.processor.RouteContextProcessor$1.done(RouteContextProcessor.java:56)
> > at org.apache.camel.processor.Pipeline.process(Pipeline.java:106)
> > at
> >
> org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
> > at
> >
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> > at
> >
> org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
> > at
> >
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
> > at
> >
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> > at
> >
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
> > at
> >
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> > at
> >
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
> > at
> >
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> > at
> >
> org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:260)
> > at
> > org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:172)
> > at
> > org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:131)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> >
> > On Wed, Mar 28, 2012 at 07:14, Christian Müller <
> christian.mueller@gmail.com
> >> wrote:
> >
> >> What we do in this case is:
> >>
> >> enrich("direct:step1", firstAggregationStrategy)
> >> enrich("direct:step2", secondAggregationStrategy)
> >> ...
> >>
> >> from("direct:step1")
> >> .convertBodyTo(Foo.class)
> >> .to("cxf:...");
> >>
> >> from("direct:step2")
> >> .convertBodyTo(Bar.class)
> >> .to("cxf:...");
> >>
> >> We implemented custom type converter [1] for the converter logic. But
> you
> >> can also use (custom) data formats to transform from/to the types you
> >> need...
> >>
> >> [1] http://camel.apache.org/type-converter.html
> >>
> >> Best,
> >> Christian
> >>
> >> On Wed, Mar 28, 2012 at 12:19 AM, GPRSLyons <GP...@gmail.com>
> wrote:
> >>
> >> > Gents-
> >> >
> >> > As always, thanks for the help.
> >> >
> >> > In my route, it is very simple for me to convert the payload to
> JSON...
> >> >
> >> > .unmarshal().gzip()
> >> > .unmarshal().json(JsonLibrary.Jackson, MyClass.class)
> >> >
> >> > However, I would like to enrich my content from multiple sources, such
> >> > as...
> >> >
> >> > .loop(SOURCES.length)
> >> > .enrich("source", new MyAggregationStrategy())
> >> > .end
> >> >
> >> > Is there a way to apply that same conversion before the
> >> AggregationStrategy
> >> > is called? Working with byte arrays within the AggregationStrategy is
> >> > becoming very complex. I tried using the TypeConverter within the
> >> > MyAggregationStrategy, but it is challenging to determine how to
> >> replicate
> >> > the unmarshalling calls I make within the route in the same manner in
> the
> >> > AggregationStrategy :(
> >> >
> >> > -Shan
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://camel.465427.n5.nabble.com/Enrichment-and-Type-Conversion-tp5599040p5599040.html
> >> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >
> >>
> >
> >
> >
> > --
> > -Sam
>
>
>
> --
> Claus Ibsen
> -----------------
> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>
--
-Sam
Re: FTP Polling errors
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Maybe try setting stepwise=false.
See more details at
http://camel.apache.org/ftp2
And it seems your FTP server dont like changing directory to the user
root directory (eg /).
Also mind if the server is unix or windows. There is a separator
option to explicit configure that.
On Wed, Mar 28, 2012 at 8:16 AM, Sam (Stephen Samuel)
<sa...@gmail.com> wrote:
> Hi all,
>
> I'm getting exceptions on the FTP consumer, which I'm not worried about in
> itself, but it seems to stop the FTP from polling.
>
> Any ideas on how I can have camel ignore such errors and keep polling ?
>
> [Camel (camel-1) thread #2 - ftp://ecb03ec2.otherhosting.net] WARN
> RemoteFilePollingConsumerPollStrategy.rollback - Consumer FtpConsumer[
> ftp://ecb0xxxxx?include=crml.*.xml&move=.done&password=******&username=opta]
> could not poll endpoint: Endpoint[
> ftp://exxxxxxxxxt?include=crml.*.xml&move=.done&password=******&username=opta]
> caused by: File operation failed: 150 Here comes the directory listing.
> Cannot change directory to: /. Code: 150
> org.apache.camel.component.file.GenericFileOperationFailedException: File
> operation failed: 150 Here comes the directory listing.
> Cannot change directory to: /. Code: 150
> at
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:628)
> at
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:591)
> at
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:53)
> at
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:100)
> at
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:140)
> at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> [Camel (camel-1) thread #6 - seda://scorecardPublisher] ERROR
> GenericFileOnCompletion.error - Caused by:
> [org.apache.camel.component.file.GenericFileOperationFailedException -
> Cannot rename file: GenericFile[crml-33934.xml] to:
> GenericFile[//.done/crml-33934.xml]]
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> rename file: GenericFile[crml-33934.xml] to:
> GenericFile[//.done/crml-33934.xml]
> at
> org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:98)
> at
> org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:86)
> at
> org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:132)
> at
> org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:82)
> at
> org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:53)
> at
> org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:56)
> at
> org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:222)
> at
> org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:199)
> at
> org.apache.camel.processor.UnitOfWorkProcessor.access$000(UnitOfWorkProcessor.java:37)
> at
> org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:157)
> at
> org.apache.camel.processor.RouteContextProcessor$1.done(RouteContextProcessor.java:56)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:106)
> at
> org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> at
> org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
> at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
> at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:71)
> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
> at
> org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:260)
> at
> org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:172)
> at
> org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:131)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
> On Wed, Mar 28, 2012 at 07:14, Christian Müller <christian.mueller@gmail.com
>> wrote:
>
>> What we do in this case is:
>>
>> enrich("direct:step1", firstAggregationStrategy)
>> enrich("direct:step2", secondAggregationStrategy)
>> ...
>>
>> from("direct:step1")
>> .convertBodyTo(Foo.class)
>> .to("cxf:...");
>>
>> from("direct:step2")
>> .convertBodyTo(Bar.class)
>> .to("cxf:...");
>>
>> We implemented custom type converter [1] for the converter logic. But you
>> can also use (custom) data formats to transform from/to the types you
>> need...
>>
>> [1] http://camel.apache.org/type-converter.html
>>
>> Best,
>> Christian
>>
>> On Wed, Mar 28, 2012 at 12:19 AM, GPRSLyons <GP...@gmail.com> wrote:
>>
>> > Gents-
>> >
>> > As always, thanks for the help.
>> >
>> > In my route, it is very simple for me to convert the payload to JSON...
>> >
>> > .unmarshal().gzip()
>> > .unmarshal().json(JsonLibrary.Jackson, MyClass.class)
>> >
>> > However, I would like to enrich my content from multiple sources, such
>> > as...
>> >
>> > .loop(SOURCES.length)
>> > .enrich("source", new MyAggregationStrategy())
>> > .end
>> >
>> > Is there a way to apply that same conversion before the
>> AggregationStrategy
>> > is called? Working with byte arrays within the AggregationStrategy is
>> > becoming very complex. I tried using the TypeConverter within the
>> > MyAggregationStrategy, but it is challenging to determine how to
>> replicate
>> > the unmarshalling calls I make within the route in the same manner in the
>> > AggregationStrategy :(
>> >
>> > -Shan
>> >
>> > --
>> > View this message in context:
>> >
>> http://camel.465427.n5.nabble.com/Enrichment-and-Type-Conversion-tp5599040p5599040.html
>> > Sent from the Camel - Users mailing list archive at Nabble.com.
>> >
>>
>
>
>
> --
> -Sam
--
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/