AnsweredAssumed Answered

How to convert xml profile  into a string? We have requirement that xml response profile from Salesforce should be converted as string in CDATA format and sent to external system?

Question asked by brathour on Jan 12, 2017
Latest reply on Jan 12, 2017 by praveen.katkoori

We have requirement that xml response profile from Salesforce should be converted as string in CDATA format and sent to external system?

 

Request format:

<soapenv:Body>
<web:getCompositeForm>
<applicationIdSASA>20000</applicationIdSASA>
<formIdasxsxs>1027036</formIdasxsxs>
</web:getCompositeForm>
</soapenv:Body>
</soapenv:Envelope>

 

Expected response is:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<p429:getCompositeFormResponse xmlns:p429="http://webservice.fms.edge.oem">
<getCompositeFormReturn><![CDATA[<?xml version="1.0" encoding="UTF-8"?><response>
<content>
<top isMany="false" srcPath="/top">
<stepPlanApproval form="1027036" isMany="true" srcPath="/top/stepPlanApproval[1]">
<prelimOrFinal form="1027036" isMany="false" srcPath="/top/stepPlanApproval[1]/prelimOrFinal">Final</prelimOrFinal>
<uniqueWebRDTSId form="1027036" isMany="false" srcPath="/top/stepPlanApproval[1]/uniqueWebRDTSId">13071</uniqueWebRDTSId>
<stepPlanAttach form="1027036" isMany="true" srcPath="/top/stepPlanApproval[1]/stepPlanAttach[1]">
<attachmentDescription form="1027036" isMany="false" srcPath="/top/stepPlanApproval[1]/stepPlanAttach[1]/attachmentDescription">00YY786.P07148.pdf</attachmentDescription>....
</response>]]></getCompositeFormReturn>
</p429:getCompositeFormResponse>
</soapenv:Body>
</soapenv:Envelope>

Outcomes