Forum Discussion

italkbb's avatar
New Contributor
7 years ago

soap request doesn't replace variable


I'm trying to build a script that will open a file of phone numbers, 1 per line. It then reads in each line and add each line to an array. I add the array to the context.


def msisdnList = []
new File("C:\\Users\\Jerry\\Documents\\MVNO\\soapui\\msisdn_99.txt").eachLine { f ->
if (f != null ) {
     // f
if (msisdnList.size() < 1) {"No request msisdn")
context.put('msisdnList', msisdnList)

In the next step, i check i can read the array, which works fine: "MSISDN: ${context.get('msisdnList').last()}"

In the failing step, i try a soap request which (envelope and header skipped) like this:


running this, I get error because what goes out is 



Does substitution work in SOAP request?



4 Replies

  • Can you try one thing ?


    Inplace of putting all those directly in the Soap request.


    1-Just add a data generator before the Soap request.

    2-Add a Template in the data generator .

    3-Add this in the Template.


    4-Run the data generator .

    5-Now call & add the template key in the Soap request & run the step.


    Hope it will work . 

    • italkbb's avatar
      New Contributor

      I am looking for a SoapUI solution. As far as I can see, the data generator is part of SoapUI PRO. I don't have $599 to solve this problem! 

      Is this possible on SoapUI Open Source?

      • Pritish_Panda's avatar

        You don't have $599 to solve this problem! sorry to hear that .  I thought you are using PRO version . 


        You will get the solution soon by any expert.