Hi All

i have to aggregate two XML files which are available at different 
times.but i am getting error in out put file.

here i am providing my code error details

 public void configure() {
                                  try {
                                            DataFormat bindy = new
BindyCsvDataFormat("com.softedge.dto");
                                            DataFormat bindy1 = new
BindyCsvDataFormat("com.softedge.dto");
                                                  
from("file://TEST?fileName=order.csv&noop=true").
                                                  unmarshal(bindy).
                                                  marshal().
                                                  xstream().
                                                  
to("file://TESTOUT?fileName=order.xml");
                                                  
from("file://TEST?fileName=order_line.csv&noop=true").
                                                  unmarshal(bindy1).
                                                  marshal().
                                                  xstream().
                                                  
to("file://TESTOUT?fileName=orderLine.xml");
                                                  Thread.sleep(1000);
                                                  
from("file://TESTOUT?idempotent=true")
                                                  .aggregate(body(),new 
MyAggregationStrategy())
                                                      .completionTimeout(30000)
                                                     // .batchSize(2)
                                                  
.to("file://TESTOUTA?fileName=aggregate.xml");
                                                 



the out put file should contain the data from Order.xml, OrderLine.xml 

but the output file aggregate.xml  contains only orderline out put and it is
showing the error 

"Only one top level element is allowed in an XML document. Error processing
resource"

pls help me out
 



--
View this message in context: 
http://camel.465427.n5.nabble.com/problem-in-aggregation-tp5717293.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to