tXMLMap Component and Web Service Parameter that is an Array of Strings

Four Stars

tXMLMap Component and Web Service Parameter that is an Array of Strings

I am using the tXMLMap component to format data for a tESBConsumer component (using Talend Data Integration 6.4.1) to talk to a SOAP Web Service. We need to use a Web Service method that requires one of its parameters to be an array of strings, such that the payload needs to become something like:

"...   <simpleParam>Simple Param Value</simpleParam><arrayOfStringsParam><string>Array Item 1</string><string>Array Item 2</string><string>Array Item 3</string></arrayOfStringsParam> ..."

 

I cannot determine how to pass the array into the control to get it in the correct format. There is no type for Schema fields of String[].

  

There is already a loop element in the tXMLMap, used for each input record, so I cannot use the looping mechanism.

 

I tried a type List but it got written out in the payload as something like "... <arrayOfStringsParam>[Array Item 1, Array Item 2,Array Item 3]</arrayOfStringsParam> ...".

 

I tried a type of String and formatted the data in previous steps as  "<string>Array Item 1</string><string>Array Item 2</string><string>Array Item 3</string>" but in the resulting payload the less-than (<) signs got encoded to "&lt;" so they weren't recognised as proper tags.

 

Can someone please let me know how to get this data in the appropriate format.

 

Thanks in anticipation,

Alan

 

Tags (1)
Moderator

Re: tXMLMap Component and Web Service Parameter that is an Array of Strings

Hello,

Could you please post your current job design screenshot on forum which will be helpful for us to understand your job requirement?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

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

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read