camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mills, Gary (GE Digital)" <gary.L.mi...@ge.com>
Subject HELP Camel Splitter Question - thanks in advance
Date Thu, 09 Jun 2016 22:51:22 GMT
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 ???)




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message