camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From panzerhans <espen+ca...@tjonneland.no>
Subject Re: Camel-cxf jax-ws POJO and response
Date Mon, 25 Jun 2012 14:06:04 GMT
I think I have found the answer.

For 1:

Tell Camel that the message that replies back to the originator is the
"ConvertImportFileWSToImportJob" by adding the .inOnly() flag later in the
route. Now the exchange.out.body will be sent back to the caller of the
Webservice.

from("cxf:bean:import-webservice?dataFormat=POJO")
                .routeId("FileImportWSRoute")
                .to("bean:UUIDGenerator")
                .to("bean:ConvertImportFileWSToImportJob")
                    .split().method("FileImportJobSplitterBean",
"splitMessage")*.inOnly()*
                        .recipientList(header("destination")); 

For 2:
Ensure that there is a consistent aggragationID on all the messages down
wind in the splitting process. I did this by adding the required header data
into all of the split JMS messages and adding it up (in the aggregator). If
the required number of messages was not reached within the
"completionInterval" no message would be shipped. I am guessing there is a
more elegant way to write this (but I haven't found it yet).

from("cxf:bean:import-webservice?dataFormat=POJO")
                .routeId("FileImportWSRoute")
                .to("bean:UUIDGenerator")
                .to("bean:ConvertImportFileWSToImportJob")
                    .split().method("FileImportJobSplitterBean",
"splitMessage").inOnly()
                        .recipientList(header("destination"))
                    *.end()//
                .aggregate(header("UUID"), new
SumSuccessesAggregationStrategy()).completionInterval(5000L).to("SendBackToBizTalk");*

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-cxf-jax-ws-POJO-and-response-tp5715039p5715051.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message