Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ppkabore
Contributor
Contributor

tXMLMap to string output

Hi,

 

   I started my first Talend project and have implemented few jobs with ease. Now I want to send REST Post request using json as the request body. So I used these components: tDBInput -> tXMLMap -> tRestClient. In tXMLMap the output schema has 2 columns: body of type Document and string of type string. It worked once and then stop working. I replaced the tRestClient with tLogRow and see that the string column in the output is null, however the document column is correct. How to get tXMLMap to populate the string output column.I used TOS ESB 7.2.1 and TOS ESB 7.3.1 with same result. I know I can use other components but like to know what I'm missing here.

 

Thanks in advance.

 

Labels (2)
1 Solution

Accepted Solutions
ppkabore
Contributor
Contributor
Author

I got it ok by removing the string column in the tRestClient input schema. That forced Talend to pass the body column to tXMLMap, instead of the string column.

 

Thanks.

View solution in original post

2 Replies
manodwhb
Champion II
Champion II

Body column you need to convert document to string then use tjavarow component and use the function String.value of (row1.body).
ppkabore
Contributor
Contributor
Author

I got it ok by removing the string column in the tRestClient input schema. That forced Talend to pass the body column to tXMLMap, instead of the string column.

 

Thanks.