camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From souciance <souciance.eqdam.ras...@gmail.com>
Subject Re: HELP Camel Splitter Question - thanks in advance
Date Fri, 10 Jun 2016 06:09:42 GMT
Try converting the body to string after the streaming part.
Den 10 juni 2016 12:51 fm skrev "Mills, Gary (GE Digital) [via Camel]" <
ml-node+s465427n5783810h73@n5.nabble.com>:

> Hello,
>
> Can you tell me why this isn't working and it's real strange.
> If I use the <simple>${body}</simple> * I cannot use tokenize with it ( I
> don't know if they work together or not ), it throws a schema impl
> exception.
> But it produces a different result which is the same as the input file as
> if it is not split at all.  See below: with tokenize
>
> My test input file content:
> A
> B
> C
> D
>
> The route ( its text book ) I don't get it.
>
> <route>
>        <from id="startAsciiRoute" ref="sftpServer2" />
>        <log message="Before Split message body: ${body}"/>
>        <split streaming="true">
>               <tokenize token="\n" />
>               <log message="Split line ${body}"/>
>               <to
> uri="{{myTestTarget}}?fileName=/${file:name.noext}-${date:now:yyyy-MM-dd}.${file:name.ext}&amp;charset={{Encoding2}}"
> />
>        </split>
> </route>
>
>       <cm:property name="mytest.hostname" value="123.123.123.123" />
>       <cm:property name="mytest.port" value="10022" />
>       <cm:property name="mytest.username" value="foo" />
>       <cm:property name="mytest.password" value="bar" />
>       <cm:property name="mytest.attachmentsPath" value="/" />
>       <cm:property name="mytest.path" value="fromvan/guid" />
>       <cm:property name="mytest.recursive" value="false" />
>       <cm:property name="mytest.move" value=".moved" />
>       <cm:property name="mytest.readLock" value="changed"/>
>       <cm:property name="mytest.disconnect" value="true" />
>       <cm:property name="myTestTarget"
> value="file:/data1/archive/outputArchive/myTestFolder"/>
>       <cm:property name="Encoding" value="US-ASCII"/>
>       <cm:property name="Encoding2" value="UTF-8"/>
>       <cm:property name="Encoding3" value="Windows-1252"/>
>
> My output I would expect should be:
> Split Line A
> Split Line B
> Split Line C
> Split Line D
> File1  : A
> File2  : B
> File3  : C
> File4  : D
> BUT THIS IS WHAT I'm GETTING: ??? IDK   this one has my head spinning.
> I'm on camel 2.15.1 and the fuse 6.2-133
>
> 2016-06-09 18:16:15,922 | INFO  | 022/fromvan/guid | route1
>             | ?                                   ? | 198 -
> org.apache.camel.camel-core - 2.15.1.redhat-620133 | Before Split message
> body: A
> B
> C
> D
> 2016-06-09 18:16:15,939 | INFO  | 022/fromvan/guid | route1
>             | ?                                   ? | 198 -
> org.apache.camel.camel-core - 2.15.1.redhat-620133 | Split line -rwxrwxrwx
>   1 0        0              10 Jun 09 22:16 splitterTestFile.txt ( this is
> my output ???)
>
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/HELP-Camel-Splitter-Question-thanks-in-advance-tp5783810.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/HELP-Camel-Splitter-Question-thanks-in-advance-tp5783810p5783811.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message