Skip to Content
0
Jun 16, 2021 at 04:53 PM

How to pass XML as string message in SOAP request CPI ?

617 Views

Hello All,

I need to send an XML data as string to third-party system. Below is the sample payload that I can pass from SOAP UI, here I converted the xml payload to string by using CDATA.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <tem:TextXML>
         <tem:xmlFile>
<![CDATA[<ProdCatalog>
  <ArrayOfPCatInfo>
    <PCatInfo>
      <PFC>51</PFC>
      <PF></PF>
      <S>03</S>
      <PC>CAN-LINK II</PC>
      <P>CAN-Link II</P>
    </PCatInfo>
</ArrayOfPCatInfo><ProdCatalog>]]></tem:xmlFile>
      </tem:TextXML>
   </soapenv:Body> 
</soapenv:Envelope>

when I try to achieve the same in CPI, message mapping fails to simulate the data. It seems CDATA is not recognized in message mapping.

Can anyone help here.


Best Regards,

Senthil