I am completely new to wso2 and I need to change my given input request xml to json and hit this to an adapter and get the response back in json and then in xml. How is this possible??
I am using wso2 integration studio for the development.
<Request>
<requestId><![CDATA[11111111111111111]]></requestId>
<timeStamp><![CDATA[2019/12/25 12:12:12]]> </timeStamp>
<msisdn> <![CDATA[888]]></msisdn>
<keyWord><![CDATA[TEST_API]]></keyWord>
<dataSet>
<param>
<id><![CDATA[first_id]]></id>
<value><![CDATA[12310209842396]]></value>
</param>
<param>
<id><![CDATA[second_id]]></id>
<value><![CDATA[1]]></value>
</param>
</dataSet>
</Request>
In the mediation sequence, you can use the messageType property to indicate that the message should be converted to JSON when sending it to your adapter. And in the return phase, you can use the messageType property again to convert the message to XML.
Example: