I see, my understanding of the component is wrong.

Cheers for the help, I have over come this by simply creating a processor
which Zips up my file and places it in a given dir.

Thanks, James

On 23 February 2012 07:42, Claus Ibsen <[email protected]> wrote:

> On Wed, Feb 22, 2012 at 5:34 PM, James Morgan <[email protected]>
> wrote:
> > Hi, I'm using Camel to process files (zipping pdfs) before being sent to
> > AWS using the Camel AWS component but I'm having trouble working out what
> > is created, where it is created and how to access the body once its been
> > through the zipping process?
> >
> > My first route definition works great, creating a file and then setting
> > this back on the message body in preparation for the zipping process but
> > I'm struggling to work out what happens next.
> >
> > Once it hits my "direct:batchPdfCreated" route and its run through the
> > zipping process, what is the outcome/resource which this creates? Does it
> > zip the file, if so where does it go and how can I access this? I have
> > debugged the route and cannot really see what's there.
> >
>
> The zip data format is for compressing the message body (not zip files).
> And the result of the zip operation is that the message body will be
> compressed,
> so its stored in-memory on the Camel Message.
>
> You would need to route to a file endpoint to have it written as a file.
>
>
> > Also what would you recommend as the best way to test this. I was simply
> > going to intercept the route and assert a zip is created, obviously this
> > fails?
> >
> > Currently my routes looks something like this.
> >
> >         // Create my file for zipping, the compoinet of this places a
> File
> > as the message body in preration for the next seciton of my route.
> >        from("direct:marshalRequest")
> >            .to("bean:createBatchPdfProcessor")
> >            .to("direct:batchPdfCreated")
> >        .end();
> >
> >        // ZIP file
> >        from("direct:batchPdfCreated")
> >            .marshal()
> >            .zip(Deflater.DEFAULT_COMPRESSION)
> >            .to("direct:zipResourceCreated")
> >        .end();
> >
> >        // Next stage is to send to AWS
> >
> > Thanks for any help/advise you may be able to give me,
> >
> > James
> >
> > Camel Version 2.8.4, Java 6, Spring 3.0.4
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: [email protected]
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Reply via email to