I have a use case where I have a set of SOAP samplers in a For Each Controller. In each iteration for the same SOAP action I want to use different SOAP data. So I can have the data in different files instead of pasting the data in the SOAP Data section and include a counter in the filename such that for each iteration it uses a different filename for the same action. However some of the content in the data is dynamically generated by the previous SOAP actions. I cannot include variables in the content in the files, because they don't get resolved. So I was wondering if there is a replace function that will replace certain text from the input file with some other text. I am not familiar with BeanShell scripts, if this can be done with bean shell scripts.
I think one way to get around this would be to put an Interleave or Random Controller inside the For Each Controller with as many samplers for the SOAP action as the number of different SOAP data that I want to use. But it's not ideal if I want to use many different SOAP data. Thanks.

