You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fbarbat <fb...@gmail.com> on 2013/04/16 17:04:39 UTC
Bindy fixed length
Hi,
Is there anything similar to Hibernate's components in bindy? It would be
nice if we can nest objects to model one line.
Thanks.
--
View this message in context: http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Bindy fixed length
Posted by Magnus Palmér <ma...@gmail.com>.
It should work, but it doesn't for me.
Seems like the BindyFixedLengthFactory does properly notice that I have
linked two fields in the middle of my record when it builds the model, but
when it does the parsing (unmarshalling) it tries to read all the fields
from the main record and not properly take into account the pos in the
record.
So with Rec1 with fields 1,2,3,Linked(4,5), 6,7 reads the field from the
input as 1,2,3,6,7,4,5
In other words, it doesn't take pos or position into consideration.
Not sure if it is a bug or if I do something wrong, I've only used Bindy
for CSV myself previously.
2013/4/18 fbarbat <fb...@gmail.com>
> I tried it but I couldn't make it work. It says @Link is for @CsvRecord.
> Should it work on @FixedLengthRecord too?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731093.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: Bindy fixed length
Posted by Charles Moulliard <ch...@gmail.com>.
Ticket created : https://issues.apache.org/jira/browse/CAMEL-6323
On Sat, Apr 27, 2013 at 12:49 PM, Charles Moulliard <ch...@gmail.com>wrote:
> Will have a look tomorrow to solve the bug.
>
>
> On Sat, Apr 27, 2013 at 11:06 AM, Babak Vahdat <
> babak.vahdat@swissonline.ch> wrote:
>
>> Hi Charles,
>>
>> This new test being committed into trunk is failing for me:
>>
>> ~/dev/workspace/camel/components/camel-bindy>mvn test
>> -Dtest=BindySimpleFixedLengthWithLinkTest
>> [INFO] Scanning for projects...
>> [INFO]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building Camel :: Bindy 2.12-SNAPSHOT
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO]
>> [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @
>> camel-bindy
>> ---
>> [INFO]
>> [INFO] --- maven-remote-resources-plugin:1.4:process (default) @
>> camel-bindy
>> ---
>> [INFO]
>> [INFO] >>>
>> camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
>> (default) @ camel-bindy >>>
>> [INFO]
>> [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @
>> camel-bindy
>> ---
>> [INFO]
>> [INFO] --- maven-remote-resources-plugin:1.4:process (default) @
>> camel-bindy
>> ---
>> [INFO]
>> [INFO] <<<
>> camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
>> (default) @ camel-bindy <<<
>> [INFO]
>> [INFO] ---
>> camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
>> (default) @ camel-bindy ---
>> [INFO]
>> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
>> camel-bindy ---
>> [INFO] Using 'UTF-8' encoding to copy filtered resources.
>> [INFO] Copying 5 resources
>> [INFO] Copying 3 resources
>> [INFO]
>> [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
>> camel-bindy ---
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO]
>> [INFO] --- maven-resources-plugin:2.6:testResources
>> (default-testResources)
>> @ camel-bindy ---
>> [INFO] Using 'UTF-8' encoding to copy filtered resources.
>> [INFO] Copying 41 resources
>> [INFO] Copying 3 resources
>> [INFO]
>> [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @
>> camel-bindy ---
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO]
>> [INFO] --- maven-surefire-plugin:2.13:test (default-test) @ camel-bindy
>> ---
>> [INFO] Surefire report directory:
>>
>> /Users/bvahdat/dev/workspace/camel/components/camel-bindy/target/surefire-reports
>>
>> -------------------------------------------------------
>> T E S T S
>> -------------------------------------------------------
>> Running
>>
>> org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest
>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.42 sec
>> <<<
>> FAILURE!
>>
>> testUnmarshallMessage(org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest)
>> Time elapsed: 0.332 sec <<< FAILURE!
>> org.junit.ComparisonFailure: expected:<[BBB]> but was:<[CCC]>
>> at org.junit.Assert.assertEquals(Assert.java:115)
>> at org.junit.Assert.assertEquals(Assert.java:144)
>> at
>>
>> org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest.testUnmarshallMessage(BindySimpleFixedLengthWithLinkTest.java:63)
>>
>>
>> Results :
>>
>> Failed tests:
>>
>>
>> BindySimpleFixedLengthWithLinkTest.testUnmarshallMessage:63->Assert.assertEquals:144->Assert.assertEquals:115
>> expected:<[BBB]> but was:<[CCC]>
>>
>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 3.115s
>> [INFO] Finished at: Sat Apr 27 11:02:48 CEST 2013
>> [INFO] Final Memory: 13M/1011M
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-surefire-plugin:2.13:test (default-test) on
>> project camel-bindy: There are test failures.
>> [ERROR]
>> [ERROR] Please refer to
>>
>> /Users/bvahdat/dev/workspace/camel/components/camel-bindy/target/surefire-reports
>> for the individual test results.
>> [ERROR] -> [Help 1]
>> [ERROR]
>> [ERROR] To see the full stack trace of the errors, re-run Maven with the
>> -e
>> switch.
>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions,
>> please
>> read the following articles:
>> [ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>>
>> Babak
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731667.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
Re: Bindy fixed length
Posted by Charles Moulliard <ch...@gmail.com>.
Will have a look tomorrow to solve the bug.
On Sat, Apr 27, 2013 at 11:06 AM, Babak Vahdat
<ba...@swissonline.ch>wrote:
> Hi Charles,
>
> This new test being committed into trunk is failing for me:
>
> ~/dev/workspace/camel/components/camel-bindy>mvn test
> -Dtest=BindySimpleFixedLengthWithLinkTest
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Camel :: Bindy 2.12-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-bindy
> ---
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.4:process (default) @
> camel-bindy
> ---
> [INFO]
> [INFO] >>>
> camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
> (default) @ camel-bindy >>>
> [INFO]
> [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-bindy
> ---
> [INFO]
> [INFO] --- maven-remote-resources-plugin:1.4:process (default) @
> camel-bindy
> ---
> [INFO]
> [INFO] <<<
> camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
> (default) @ camel-bindy <<<
> [INFO]
> [INFO] ---
> camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
> (default) @ camel-bindy ---
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
> camel-bindy ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 5 resources
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
> camel-bindy ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources)
> @ camel-bindy ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 41 resources
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @
> camel-bindy ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:2.13:test (default-test) @ camel-bindy ---
> [INFO] Surefire report directory:
>
> /Users/bvahdat/dev/workspace/camel/components/camel-bindy/target/surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running
>
> org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.42 sec
> <<<
> FAILURE!
>
> testUnmarshallMessage(org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest)
> Time elapsed: 0.332 sec <<< FAILURE!
> org.junit.ComparisonFailure: expected:<[BBB]> but was:<[CCC]>
> at org.junit.Assert.assertEquals(Assert.java:115)
> at org.junit.Assert.assertEquals(Assert.java:144)
> at
>
> org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest.testUnmarshallMessage(BindySimpleFixedLengthWithLinkTest.java:63)
>
>
> Results :
>
> Failed tests:
>
>
> BindySimpleFixedLengthWithLinkTest.testUnmarshallMessage:63->Assert.assertEquals:144->Assert.assertEquals:115
> expected:<[BBB]> but was:<[CCC]>
>
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 3.115s
> [INFO] Finished at: Sat Apr 27 11:02:48 CEST 2013
> [INFO] Final Memory: 13M/1011M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.13:test (default-test) on
> project camel-bindy: There are test failures.
> [ERROR]
> [ERROR] Please refer to
>
> /Users/bvahdat/dev/workspace/camel/components/camel-bindy/target/surefire-reports
> for the individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>
> Babak
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731667.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
Re: Bindy fixed length
Posted by Babak Vahdat <ba...@swissonline.ch>.
Hi Charles,
This new test being committed into trunk is failing for me:
~/dev/workspace/camel/components/camel-bindy>mvn test
-Dtest=BindySimpleFixedLengthWithLinkTest
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Camel :: Bindy 2.12-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-bindy
---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.4:process (default) @ camel-bindy
---
[INFO]
[INFO] >>> camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
(default) @ camel-bindy >>>
[INFO]
[INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-bindy
---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.4:process (default) @ camel-bindy
---
[INFO]
[INFO] <<< camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
(default) @ camel-bindy <<<
[INFO]
[INFO] --- camel-package-maven-plugin:2.12-SNAPSHOT:generate-components-list
(default) @ camel-bindy ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
camel-bindy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
camel-bindy ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources)
@ camel-bindy ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 41 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @
camel-bindy ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @ camel-bindy ---
[INFO] Surefire report directory:
/Users/bvahdat/dev/workspace/camel/components/camel-bindy/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running
org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.42 sec <<<
FAILURE!
testUnmarshallMessage(org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest)
Time elapsed: 0.332 sec <<< FAILURE!
org.junit.ComparisonFailure: expected:<[BBB]> but was:<[CCC]>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at
org.apache.camel.dataformat.bindy.fixed.link.BindySimpleFixedLengthWithLinkTest.testUnmarshallMessage(BindySimpleFixedLengthWithLinkTest.java:63)
Results :
Failed tests:
BindySimpleFixedLengthWithLinkTest.testUnmarshallMessage:63->Assert.assertEquals:144->Assert.assertEquals:115
expected:<[BBB]> but was:<[CCC]>
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3.115s
[INFO] Finished at: Sat Apr 27 11:02:48 CEST 2013
[INFO] Final Memory: 13M/1011M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.13:test (default-test) on
project camel-bindy: There are test failures.
[ERROR]
[ERROR] Please refer to
/Users/bvahdat/dev/workspace/camel/components/camel-bindy/target/surefire-reports
for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Babak
--
View this message in context: http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731667.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Bindy fixed length
Posted by Charles Moulliard <ch...@gmail.com>.
I have tested your code and the test succeed. I will include it to the next
release of Camel
Here is what I have tested (
https://gist.github.com/cmoulliard/7c5bd8d98717480f988d)
On Fri, Apr 19, 2013 at 8:11 AM, Charles Moulliard <ch...@gmail.com> wrote:
> Thx. Will have a look.
>
>
> On Fri, Apr 19, 2013 at 7:21 AM, Magnus Palmér <
> magnus.palmer.work@gmail.com> wrote:
>
>> A very simple JUnit test, code and description is in the below gist:
>> https://gist.github.com/magnuspalmer/5418305
>>
>>
>>
>> 2013/4/19 Charles Moulliard <ch...@gmail.com>
>>
>> > Hi,
>> >
>> > Can you provide the code used so we can make a try (unit test using
>> > camel-bindy) and fix if there is an issue please ? As I have created the
>> > @Link long time ago, I need to refresh my brain before to tell if there
>> is
>> > an issue or not ;-)
>> >
>> > Regards,
>> >
>> >
>> > On Thu, Apr 18, 2013 at 5:34 PM, fbarbat <fb...@gmail.com> wrote:
>> >
>> > > I tried it but I couldn't make it work. It says @Link is for
>> @CsvRecord.
>> > > Should it work on @FixedLengthRecord too?
>> > >
>> > >
>> > >
>> > > --
>> > > View this message in context:
>> > >
>> >
>> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731093.html
>> > > Sent from the Camel - Users mailing list archive at Nabble.com.
>> > >
>> >
>> >
>> >
>> > --
>> > Charles Moulliard
>> > Apache Committer / Sr. Enterprise Architect (RedHat)
>> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>> >
>>
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
>
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
Re: Bindy fixed length
Posted by Charles Moulliard <ch...@gmail.com>.
Thx. Will have a look.
On Fri, Apr 19, 2013 at 7:21 AM, Magnus Palmér <magnus.palmer.work@gmail.com
> wrote:
> A very simple JUnit test, code and description is in the below gist:
> https://gist.github.com/magnuspalmer/5418305
>
>
>
> 2013/4/19 Charles Moulliard <ch...@gmail.com>
>
> > Hi,
> >
> > Can you provide the code used so we can make a try (unit test using
> > camel-bindy) and fix if there is an issue please ? As I have created the
> > @Link long time ago, I need to refresh my brain before to tell if there
> is
> > an issue or not ;-)
> >
> > Regards,
> >
> >
> > On Thu, Apr 18, 2013 at 5:34 PM, fbarbat <fb...@gmail.com> wrote:
> >
> > > I tried it but I couldn't make it work. It says @Link is for
> @CsvRecord.
> > > Should it work on @FixedLengthRecord too?
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731093.html
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >
> >
> >
> >
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
> >
>
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
Re: Bindy fixed length
Posted by Charles Moulliard <ch...@gmail.com>.
Hi Magnus,
I have committed a modification to camel-bindy (
https://issues.apache.org/jira/browse/CAMEL-6323).
That works with camel-2.12-SNAPSHOT and
http://svn.apache.org/repos/asf/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/link/BindySimpleFixedLengthWithLinkTest.java
Regards,
Charles
On Fri, Apr 19, 2013 at 7:21 AM, Magnus Palmér <magnus.palmer.work@gmail.com
> wrote:
> A very simple JUnit test, code and description is in the below gist:
> https://gist.github.com/magnuspalmer/5418305
>
>
>
> 2013/4/19 Charles Moulliard <ch...@gmail.com>
>
> > Hi,
> >
> > Can you provide the code used so we can make a try (unit test using
> > camel-bindy) and fix if there is an issue please ? As I have created the
> > @Link long time ago, I need to refresh my brain before to tell if there
> is
> > an issue or not ;-)
> >
> > Regards,
> >
> >
> > On Thu, Apr 18, 2013 at 5:34 PM, fbarbat <fb...@gmail.com> wrote:
> >
> > > I tried it but I couldn't make it work. It says @Link is for
> @CsvRecord.
> > > Should it work on @FixedLengthRecord too?
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731093.html
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >
> >
> >
> >
> > --
> > Charles Moulliard
> > Apache Committer / Sr. Enterprise Architect (RedHat)
> > Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
> >
>
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
Re: Bindy fixed length
Posted by Magnus Palmér <ma...@gmail.com>.
A very simple JUnit test, code and description is in the below gist:
https://gist.github.com/magnuspalmer/5418305
2013/4/19 Charles Moulliard <ch...@gmail.com>
> Hi,
>
> Can you provide the code used so we can make a try (unit test using
> camel-bindy) and fix if there is an issue please ? As I have created the
> @Link long time ago, I need to refresh my brain before to tell if there is
> an issue or not ;-)
>
> Regards,
>
>
> On Thu, Apr 18, 2013 at 5:34 PM, fbarbat <fb...@gmail.com> wrote:
>
> > I tried it but I couldn't make it work. It says @Link is for @CsvRecord.
> > Should it work on @FixedLengthRecord too?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731093.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
>
> --
> Charles Moulliard
> Apache Committer / Sr. Enterprise Architect (RedHat)
> Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
>
Re: Bindy fixed length
Posted by Charles Moulliard <ch...@gmail.com>.
Hi,
Can you provide the code used so we can make a try (unit test using
camel-bindy) and fix if there is an issue please ? As I have created the
@Link long time ago, I need to refresh my brain before to tell if there is
an issue or not ;-)
Regards,
On Thu, Apr 18, 2013 at 5:34 PM, fbarbat <fb...@gmail.com> wrote:
> I tried it but I couldn't make it work. It says @Link is for @CsvRecord.
> Should it work on @FixedLengthRecord too?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731093.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com
Re: Bindy fixed length
Posted by fbarbat <fb...@gmail.com>.
I tried it but I couldn't make it work. It says @Link is for @CsvRecord.
Should it work on @FixedLengthRecord too?
--
View this message in context: http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731093.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Bindy fixed length
Posted by Magnus Palmér <ma...@gmail.com>.
There are examples of how to do it on the Bindy documentation page:
http://camel.apache.org/bindy.html
Look for the @Link
2013/4/17 fbarbat <fb...@gmail.com>
> Sorry, after I wrote the post I felt it wasn't clear enough too...
> I wanted to ask if there was a feature to similar to Hibernate's components
> (or BeanIO segments) to break the bean into a root bean and smaller nested
> beans.
>
> For example, let's suppose I have this line:
> NAME------LAST_NAME-ADDRESS---ZIP_CODE--
>
> We could model this line as a POJO called Person, and it would be something
> like this:
>
> @FixedLengthRecord
> class Person{
> @DataField(pos=1, length=10)
> private String name;
> @DataField(pos=2, length=10)
> private String lastName;
> @DataField(pos=3, length=10)
> private String address;
> @DataField(pos=4, length=10)
> private String zipCode;
>
> //Getters and setters...
> }
>
> Now, if the amount of fields grows too much, I would like to split this
> object into several nested objects. For example, now I want to have two
> objects:
>
> //Nested bean, relative to the position specified in parent bean
> @FixedLengthRecord
> class Address{
> @DataField(pos=1, length=10)
> private String address;
> @DataField(pos=2, length=10)
> private String zipCode;
>
> //Getters and setters...
> }
>
> //Root bean
> @FixedLengthRecord
> class Person {
> @DataField(pos=1, length=10)
> private String name;
> @DataField(pos=2, length=10)
> private String lastName;
> @DataField(pos=3, length=10)
> private Address address;
>
> //Getters and setters
> }
>
> I tried to find a feature like this in Bindy but I couldn't find one. As a
> workaround, I switched to BeanIO for marshalling/unmarshalling this way.
> Anyway, I would have liked to use annotations instead of the BeanIO XML
> file.
>
> Thanks,.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731037.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: Bindy fixed length
Posted by fbarbat <fb...@gmail.com>.
Sorry, after I wrote the post I felt it wasn't clear enough too...
I wanted to ask if there was a feature to similar to Hibernate's components
(or BeanIO segments) to break the bean into a root bean and smaller nested
beans.
For example, let's suppose I have this line:
NAME------LAST_NAME-ADDRESS---ZIP_CODE--
We could model this line as a POJO called Person, and it would be something
like this:
@FixedLengthRecord
class Person{
@DataField(pos=1, length=10)
private String name;
@DataField(pos=2, length=10)
private String lastName;
@DataField(pos=3, length=10)
private String address;
@DataField(pos=4, length=10)
private String zipCode;
//Getters and setters...
}
Now, if the amount of fields grows too much, I would like to split this
object into several nested objects. For example, now I want to have two
objects:
//Nested bean, relative to the position specified in parent bean
@FixedLengthRecord
class Address{
@DataField(pos=1, length=10)
private String address;
@DataField(pos=2, length=10)
private String zipCode;
//Getters and setters...
}
//Root bean
@FixedLengthRecord
class Person {
@DataField(pos=1, length=10)
private String name;
@DataField(pos=2, length=10)
private String lastName;
@DataField(pos=3, length=10)
private Address address;
//Getters and setters
}
I tried to find a feature like this in Bindy but I couldn't find one. As a
workaround, I switched to BeanIO for marshalling/unmarshalling this way.
Anyway, I would have liked to use annotations instead of the BeanIO XML
file.
Thanks,.
--
View this message in context: http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980p5731037.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Bindy fixed length
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
I think you should add more detail what you are asking about.
I dont think we understand what you want
On Tue, Apr 16, 2013 at 5:04 PM, fbarbat <fb...@gmail.com> wrote:
> Hi,
>
> Is there anything similar to Hibernate's components in bindy? It would be
> nice if we can nest objects to model one line.
>
> Thanks.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Bindy-fixed-length-tp5730980.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen