Pass Dynamic values into tSOAP Message

One Star lkv
One Star

Pass Dynamic values into tSOAP Message

I am using BD5.6.1
i am using the tSOAP component and if i use the blow flow it works fine.
tsoap --> LogRow
I can paste the SOAP Request message into SOAP Message section of the tsoap node and it works fine..
But now i want to read the excel file and dynamically pass the value to  SOAP Message of tSOAP component how this can be done?
Sample SOAP Message i need to pass.
"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xml\" xmlns:urn=\"urn:HPD_Inc_Create_WS\">
<<urn:HelpDesk_Submit_Service>
<urn:Assigned_Group>   </urn:Assigned_Group>
<urn:Assigned_Support_Company>    </urn:Assigned_Support_Company>
<urn:Assigned_Support_Organization>    </urn:Assigned_Support_Organization>
<urn:Assignee>   </urn:Assignee>
<urn:First_Name>   </urn:First_Name>
<urn:Impact>  </urn:Impact>
<urn:Last_Name>  </urn:Last_Name>
<urn:Reported_Source>  </urn:Reported_Source>
</urn:HelpDesk_Submit_Service>
</soapenv:Body>
</soapenv:Envelope>"

So here i the all the
FirstName
LastName
Impact
Reported_source
Assigned_Group
Assigned_Support_Company
 values are in the file . I need to read these value from excel file and construct the soap message and then send it to tSOAP Component.

Any help is really appreciated.
Community Manager

Re: Pass Dynamic values into tSOAP Message

Hi 
You can read the values from any a data source and pass it tSOAP component, and call the SOAP webservice line by line. eg:
tFileInputExcel--main(row1)--tFlowToIterate--iterate--tSOAP--main--tLogRow
on tSOAP, define the SOAP message to use a dynamic value passed from tFileInputExcel like this:
"....<urn:First_Name>"+(String)globalMap.get("row1.First_Name")+"</urn:First_Name>..."

//First_name is one of the column defined on tFileInputExcel, this column read the FirstName value from excel file.
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: Pass Dynamic values into tSOAP Message

Hi Shong,

I have a same difficulty. I tried to reproduce what you recommand tFileInputExcel--main(row1)--tFlowToIterate--iterate--tSOAP--main--tLogRow But it not work
For check i tried to do this  tFileInputExcel--main(row1)--tFlowToIterate--iterate-tjava

The column is search_id

System.out.println("TestValue is: "+(String)globalMap.get("row1.search_id"));

 

Can you please help me?

 

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch