This is not a question but rather an answer. I am quite new to wso2 ESB and wanted to make a test run implementing the sp
What you need to do is, mention any id in the iterator mediator (refer iterator mediator docs) and refer the same id in aggregator mediator as the correlation id. That's it. –
The aggregate mediator supports an attribute enclosingElementProperty which surrounds the responses with a single parent element. This simplifies your enrich trick:
<property name="ROOT" scope="default">
<root:rootelement xmlns:root="www.wso2esb.com"/>
</property>
<aggregate>
<completeCondition>
<messageCount min="-1" max="-1"/>
</completeCondition>
<onComplete expression="//dummy" enclosingElementProperty="ROOT">
</onComplete>
</aggregate>