Re: Issue unmarshalling Fixed Length message date

2011-05-31 Thread Christian Müller
If you use the BindyFixedLengthDataFormat, the pos attribute (lowered by one) describes the start position of this field and the length attribute the length of the attribute. This means for this example, because the first field has a length of 15 characters, it must be annotated with pos=1, length=

Re: Issue unmarshalling Fixed Length message date

2011-05-30 Thread Claus Ibsen
On Sun, May 29, 2011 at 11:46 PM, Christian Müller wrote: > The problem was the wrong pos parameter in the @DataField annotation. We > cannot use pos=1, pos=2, pos=3 and so on, if the fields are longer than only > one character. > Weird. Can you highlight this, eg the problem? I would expect the

Re: Issue unmarshalling Fixed Length message date

2011-05-29 Thread Christian Müller
The problem was the wrong pos parameter in the @DataField annotation. We cannot use pos=1, pos=2, pos=3 and so on, if the fields are longer than only one character. Christian On Sun, May 29, 2011 at 2:27 PM, Claus Ibsen wrote: > On Sun, May 29, 2011 at 1:00 PM, Christian Müller > wrote: > > Th

Re: Issue unmarshalling Fixed Length message date

2011-05-29 Thread Claus Ibsen
On Sun, May 29, 2011 at 1:00 PM, Christian Müller wrote: > The problem are the wrong bean annotations. The unit test [1] should be > helpful for you. May be we can make Camel a bit smarter. > > Your correct bean annotations should look like the following: > @FixedLengthRecord(length=71, paddingCha

Re: Issue unmarshalling Fixed Length message date

2011-05-29 Thread Christian Müller
The problem are the wrong bean annotations. The unit test [1] should be helpful for you. May be we can make Camel a bit smarter. Your correct bean annotations should look like the following: @FixedLengthRecord(length=71, paddingChar=' ') public class FixedLengthBean implements Serializable {

Re: Issue unmarshalling Fixed Length message date

2011-05-27 Thread Claus Ibsen
Hi Yeah it seems odd why the field at position 9 is not grabbing further into the text, where the date is. Fell free to create a JIRA ticket and attach an unit test showing the problem. Then we can use that to fix the bug. On Fri, May 27, 2011 at 11:41 AM, cconesa wrote: > > This is my route

Re: Issue unmarshalling Fixed Length message date

2011-05-27 Thread cconesa
This is my route configuration for test. I think I am using the rigth bindy.. @Configuration public static class ContextConfig extends SingleRouteCamelConfiguration { BindyFixedLengthDataFormat camelDataFormat = new BindyFixedLengthDataFormat(

Re: Issue unmarshalling Fixed Length message date

2011-05-27 Thread Claus Ibsen
Can you ost the camel route. Make sure you set bindy to fixed mode in the route On Friday, May 27, 2011, cconesa wrote: > I am having an issue when unmarshalling a message into a FixedLengthRecord. > The feed I am reading from contains the message below > > > 00015000144687451015000L