I want to achive the following scenario: CXF route in FUSE receives SOAP request, extracts a number of IDs from the request, creates a different SOAP message with the IDs, sends it to service A. This service replies with data associated with these IDs, and the route should insert these data to the original message and send it to the final destination service. So in short, before sending the message to the final destination, we have to take a detour and enrich our original message with data from the intermediate service. I'm researching the correct configuration (we are using Fuse ESB 6.2 pre-release with Spring-based blueprint XML).
UPDATE I'm updating my answer because after a bunch of trial and error my problems are completely solved.
Okay, the actually working version is:
Routing configuration: The enrichment call must be a seperated route in the same camel context:
In the actual route, we insert the enrichment between from and to and configure the aggregation strategy bean:
Where cxf:bean:incomingEndpoint is the entry point in our ESB and finalEndpoint is the final destination. Using this config, the processor in enrich route gets the request body so it can create the enrichment request body, send it to the enrich endpoint. Also, in the actual route, the aggregation processor is aware of the original request body and the enrichment response body so it can insert the necessary data.
Processor class:
Aggregation strategy class: