Hi Jatin,
In that case you have to write some logic to convert your DSO data in XML format and then using APD to can send it further.
First store your query data in DSO and then write a code to covert it to XML,
Please see this thread to covert it XML,
Extract SAP BW Data into XML | SCN
Hope it helps!!!!
Thanks,
Bhavin Vyas