Question

pass value from one Http client response to another request

  • 19 July 2022
  • 1 reply
  • 92 views

Hi there,

 

I have a requirement to read data from one Rest Api using Http client and then use a specific field value to set to another SOAP api request  parameter in payload.Has anyone dealt with such design in a data collector pipeline?

I

 

Example:

Get the ssn field value from rest api and pass that ssn response value as request payload in  another soap api 

get rest api SSN = “6698776” field response

and pass this SSN value in soap api request payload

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hel="http://learnwebservices.com/services/memberdata">

   <soapenv:Header/>

   <soapenv:Body>

      <hel:SayHello>

         <hel:HelloRequest>

            <hel:Name>test</hel:Name>

            <hel:SSN>6698776</hel:SSN>

         </hel:HelloRequest>

      </hel:SayHello>

   </soapenv:Body>

</soapenv:Envelope>


1 reply

Userlevel 4
Badge

Hi @shaik 

 

Use HTTP Client as origin for the first request and the response will have your SSN field. Use something like Expression Evaluator or one of the code evaluators to create your SOAP body. You can refer to the SSN field using ${record:value(‘/SSN’)} expression.

Once you have created your request xml body, use HTTP Client processor and call your SOAP API.

 

Reply