Hello,
Please find my route as :

/**
                 * Route for file reading and unmarshalling csv file to bindy 
object 
                 */     
                
                from("file:/opt/test")
                        .setProperty(FILE_NAME, header(FILE_NAME))
                        .choice()
                        .when( new FileFormatPredicate(FileNamePrefix))
                                .split().tokenize("\n").streaming()
                                
.unmarshal().bindy(BindyType.Csv,"pojo.bulkpojo")
                                .processRef("csvUnmarshalProcessor")            
                        
                                .to("direct:endPoint1")
                                .endChoice()
                        .otherwise()
                                .to("direct:InvalidFileFormat");
                        
                /**
                 * Route for Invalid File Format check.
                 */
                from("direct:InvalidFileFormat")
                .processRef("InvalidFileProcessor")
                .to(log:bulkOutputInvalid);
                
                
                /**
                 * Route for SOAP CRM call
                 */
                from("direct:endPoint1")                        
                        .processRef(REQ_PROCESSOR)
                        .to(this.getCxfCrmEndPoint().toString())
                        .processRef(RES_PROCESSOR)                      
                        .choice()
                                
.when(header(RESPONSE_CODE).isEqualTo(WS_SUCCESS_RESPONSE_CODE))
                                        .to(log:bulOutpurSuccess)
                                .otherwise()
                                        .to(log:bulkOutputFailure);

The above onCompletion() code i had added above this route and i want
onCompletion()'s processor to be called when i get FAILURE_RESPONSE_CODE
from my web service.



--
View this message in context: 
http://camel.465427.n5.nabble.com/onCompletion-in-apache-camel-called-more-than-one-time-tp5743011p5743108.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to