Forum Discussion

surya123's avatar
surya123
Occasional Contributor
15 years ago

Need code for copying data into Request

hi

I am using soapui Pro.I have created a test suite with a groovy script step and a Request step in it.

I have a couple of xmls on my pc, from which I have loaded a xml into a stringwriter.

Now, I am facing trouble as I do not know how to transfer the xml in this stringwriter to the request

the request is perfectly valid  for the service to return a response.

Can anybody please help me by providing the code for doing so?

2 Replies

  • Sjakie's avatar
    Sjakie
    Occasional Contributor
    In the request, click the right mouse button. A menu shows up, goto to Get Data and select the variable for the concerning element. You should get something like ${GroovyScript#variable}
  • surya123's avatar
    surya123
    Occasional Contributor
    hi there

    Thanks for the reply, but What I am really looking for is to transfer from a stringwriter variable in my groovy script.Its not in a datasource.