i have created a XSLT
for the WL.Server.invokeHttp
which gets the data from the backend server in XML format and performing transformation successfully
XSLT is not converting XML to JSON. XSLT transforms XML into another XML not JSON.
Once your adapter has retrieved XML from a backend the WL Server infrastructure will automcatically convert it to JSON. In case you have XSLT defined the original XML retrieved from a backend will first be translated into new XML according to XSLT and after that the new XML will be converted to JSON.
There's no out-of-the-box APIs that can convert JSON object to XML string in WL adapters. You can follow two different approaches here
Use 3rd party Java/JavaScript library to convert JSON to XML, e.g. https://code.google.com/p/x2js/ or http://www.json.org/java/. You can read more about using Java in adapters here http://www.ibm.com/developerworks/mobile/worklight/getting-started.html , search for "Using java in adapters"
Manually create your XML templates and populate them with values from JSON. See page 18+ of http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v620/04_02_HTTP_adapter_-_Communicating_with_HTTP_back-end_systems.pdf. Use {myJsonObject.propertyName} to inject values to XML.