You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Brad Johnson <br...@mediadriver.com> on 2016/10/01 17:18:44 UTC

Re: Splitting a Body and losting old informations

This a rather nebulous question.  Can you post the routes you are using?  I
suspect you are not setting the append flag on the file writer.  But
without seeing the code you are using it is impossible to tell.

fileExists=append

Look up the specifics on the syntax here: http://camel.apache.org/file2.html


On Fri, Sep 30, 2016 at 3:28 PM, retatu <ma...@unijui.edu.br>
wrote:

> I am have problems in an application...
>
> when I split the XML in 4 parts then I want to get them all together in
> another XML, but it overwrites and only the last one stand
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Splitting-a-Body-and-losting-old-informations-tp5788271.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Splitting a Body and losting old informations

Posted by retatu <ma...@unijui.edu.br>.
Hi, I  resolved my problem with script XSL... But thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Splitting-a-Body-and-losting-old-informations-tp5788271p5788404.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Splitting a Body and losting old informations

Posted by Brad Johnson <br...@mediadriver.com>.
What do you mean the "file had been rewriting"?  Do you mean it had already
been written to?  Are you always writing to the same file name?  When a new
transaction starts you can change the file name it is writing to or you can
move the existing file somewhere else. At some point I assume that you are
either sending the file somewhere or someone is picking the file up.  If
not, how would you ever be able to write to the same file name regardless
of what mechanism you are using?

The problem you stated is that you have multiple records you are reading in
and then want to write them out but they are overwriting the file.  To make
that behavior change you have to append to the file.  When a new file comes
in for processing you can check if the file already exists and move it.

That's why I said you have to give a few more details.

On Mon, Oct 3, 2016 at 8:35 AM, retatu <ma...@unijui.edu.br>
wrote:

> Yes, but if I use fileExiste=append, my file will have redundancy, because
> when I recompile the code with fileExiste=append, the file had been
> rewriting... you undesrtand?
>
>
> Ranx wrote
> > This a rather nebulous question.  Can you post the routes you are using?
> > I
> > suspect you are not setting the append flag on the file writer.  But
> > without seeing the code you are using it is impossible to tell.
> >
> > fileExists=append
> >
> > Look up the specifics on the syntax here:
> > http://camel.apache.org/file2.html
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Splitting-a-Body-and-losting-old-informations-tp5788271p5788310.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Splitting a Body and losting old informations

Posted by retatu <ma...@unijui.edu.br>.
Yes, but if I use fileExiste=append, my file will have redundancy, because
when I recompile the code with fileExiste=append, the file had been
rewriting... you undesrtand?


Ranx wrote
> This a rather nebulous question.  Can you post the routes you are using? 
> I
> suspect you are not setting the append flag on the file writer.  But
> without seeing the code you are using it is impossible to tell.
> 
> fileExists=append
> 
> Look up the specifics on the syntax here:
> http://camel.apache.org/file2.html





--
View this message in context: http://camel.465427.n5.nabble.com/Splitting-a-Body-and-losting-old-informations-tp5788271p5788310.html
Sent from the Camel - Users mailing list archive at Nabble.com.