Hi Pradeep,
If you can go for a BPM, the below link will give you stepwise solution for the same:
http://****************/Tutorials/XI/BPM/Fork1.htm
Also as your requirement is to collect messages & send as a single message, you can go for BPM MultiCollect If pattern as suggested by Raja...In your ESR, there is a BASIS SWCV, which contains a namespace http://sap.com/xi/XI/System/Patterns which contains the above example pattern. Also the Java mapping code which I posted previously can help you.