Hi Team,
We've a requirement in DataPower where I send to XML payload in embedded json request by escaping double quotes in the xml payload. I've tired below steps
1. Created a MPGW service and sending xml payload in the below jsonx request.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" extension-element-prefixes="dp" exclude-result-prefixes="dp" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" xmlns:dp="http://www.datapower.com/extensions">
<xsl:template match="/">
<json:object xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.datapower.com/schemas/json jsonx.xsd">
<json:array name="records">
<json:object>
<json:string name="key">123456</json:string>
<json:string name="value">
<json:object>
<xsl:copy-of select="."/>
</json:object>
</json:string>
</json:object>
</json:array>
</json:object>
</xsl:template>
</xsl:stylesheet>
In the above image, If you see, After jsonx2json conversation, Only XML values are passed and tags were missing. we need to send the complete xml as it is..
Appreciate your help if anyone is having solution for this above issue.
Thanks in advance.
------------------------------
Raja Kumar
------------------------------