camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scisci <ferioli.mi...@gmail.com>
Subject Camel Bindy - marshal fixed file with heade,footer and section
Date Wed, 15 Jun 2016 11:32:23 GMT
Hi, I've a problem to create a file with header, footer and sections with
header, sub_header and contents

ex: 
F994CMPU03817.33.38    20160614    80    ---> HEADER
P_AR_O  --> HEADER SECTION 
Titoli_Bloccati_Fondo_GABSORET  --> SUB_HEADER SECTION 
                                 -->CONTENT       
P_BR_O --> HEADER SECTION 
Titoli_Bloccati_Fondo_GBRASILE   --> SUB_HEADER SECTION 
4 IT0004969207     -->CONTENT                        
4 USA6111FAA69                          
P_BS_O
Titoli_Bloccati_Fondo_GEBESTSE

09END  -->FOOTER

this is the main object
@FixedLengthRecord(header = Titoli_Bloccati_BBG_CSV_Header.class,
footer=Titoli_Bloccati_BBG_CSV_Footer.class,  crlf="\r\n" )
public class Titoli_Bloccati_BBG_CSV {
	
	@Link Section_Header h;
	@Link Sub_Section_Header s;
	@Link Component component;
}

and this is the section header class ( same as subsection header and content
class) 
@Link
@FixedLengthRecord(crlf="\r\n")
public class  Section_Header implements Serializable {

	private static final long serialVersionUID = -1558606199207074824L;
	
	@DataField(pos=1,  length = 6)
	private String List_Short_Name;
	
	@DataField(pos=2,  length = 1)
	private String Blank;
	
	@DataField(pos=3,  length = 1)
	private String Append_Mode;
}
 
when I try to mashall a list of Titoli_Bloccati_BBG_CSV objecst the result
is a file filled with \r\n as the number of object in the list.

How to create with bindy a file like I've desribed above?
Thanks
Mirko









--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Bindy-marshal-fixed-file-with-heade-footer-and-section-tp5784073.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message