Layer7 API Management

 View Only
  • 1.  Convertion from JSON to SOAP XML:

    Posted Sep 11, 2019 07:38 AM
    Hi all,
    we have a requirement that client will sent the below JSON Payload that we need to convert as a soap XML(as like 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
    ------------------------------


  • 2.  RE: Convertion from JSON to SOAP XML:
    Best Answer

    Broadcom Employee
    Posted Sep 24, 2019 11:03 AM
    Hi Jagan,

    This may help: 

    REST-to-SOAP Remapping
    https://community.broadcom.com/communities/community-home/librarydocuments/viewdocument?DocumentKey=7dcae7ba-8a36-4b64-9be5-22a3bd8d423d

    Regards,
    Joe