There was a developerWorks DataPower forum thread asking how to process XML and JSON backend responses in a service and generate a combined XML respoonse. I did answer with a bigger posting containing a 6.0.1 domain backup of a demo service:
Processing JSON in XSLT can be done "as string" or via conversion to JSONX since years.
XQuery (with JSONiq extensions) can natively process XML as well as JSON.
GatewayScript can natively process JSON, and with ≥126.96.36.199 firmware natively XML as well.
Customer was on 188.8.131.52 and therefore GatewayScript was no option (≥184.108.40.206).
Solution I provided used XSLT to do backend calls by <dp:url-open> and store results into context variables, and then XQuery script to nicely combine the responses in XQuery (see above forum posting for details):