Hi all,
we have a requirement that client will sent the below JSON Payload that we need to convert as a soap XML(as shown below) and sent it to the back-end can you please help me how to achieve this.
Json payload:
{
"contactInquiryRequest":
{
"majorVersion": "3",
"minorVersion": "3",
"contactId": "ABC123ABC",
"recordType": "ORG",
"resultOptions":
{
"contactProfile":
{
"name": null,
"address": null,
"telecommunication": null,
"email": null,
"socialMedia": null,
"alternativeIdentifiers": null,
"additionalInfo": null
},
"relationshipProfile": null
}
}
}
Sample Soap XML:
<soapenv:Envelope xmlns:Soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://xmlns.xxxxs.com/customerContact">
<soapenv:Header/>
<soapenv:Body>
<cus:contactInquiryRequest majorVersion="3" minorVersion="3">
<!--You have a CHOICE of the next 2 items at this level-->
<!--1 to 100 repetitions:-->
<cus:contactId>ABC123ABC</cus:contactId>
<cus:recordType>ORG</cus:recordType>
<cus:resultOptions>
<!--Optional:-->
<cus:contactProfile>
<!--Optional:-->
<cus:name/>
<!--Optional:-->
<cus:address/>
<!--Optional:-->
<cus:telecommunication/>
<!--Optional:-->
<cus:email/>
<!--Optional:-->
<cus:SocialMedia/>
<!--Optional:-->
<cus:alternativeIdentifiers/>
<!--Optional:-->
<cus:additionalInfo/>
</cus:contactProfile>
<!--Optional:-->
<cus:relationshipProfile/>
</cus:resultOptions>
</cus:contactInquiryRequest>
</soapenv:Body>
</soapenv:Envelope>
------------------------------
Thanks,
Jagan.
------------------------------