Assign message - Create XML requeset

Hi,

I have POST request with JSON body. I have to use this JSON body and create new XML payload.
I have used assign message to create the new XML payload. But required XML payload also contains CDATA tag.

So how can I insert CDATA into XML using assign message policy?

Any help would be appriciated.

0 2 1,318
2 REPLIES 2

Hi @Prasad Walke, provide your sample XML for better answers,

Here is sample CDATA payload example, use Set in Assign Message Policy,

<Set>
        <Payload content-type="application/xml"><![CDATA[   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                <soapenv:Body>
                    <Search>
                        <stores>
                            <storeid>{storeIds}</storeid> <storeid>{storeIds2}</storeid> <storeid>{storeIds3}</storeid>
                        </stores>
                        <products>
                            <productid>{productIds}</productid> <productid>{productIds2}</productid> <productid>{productIds3}</productid>
                        </products>
                    </Search>
                </soapenv:Body>
            </soapenv:Envelope> ]]></Payload>
        <Headers>
            <Header name="Content-Type">application/xml</Header>
            <!-- Header name="Authorization">{authHeader}</Header -->
        </Headers>
        <Path/>
        <Verb>POST</Verb>
    </Set>

what did you try? What didn't work about it? (What did you observe?)