Forum Discussion

mmoles's avatar
mmoles
New Contributor
14 years ago

Transfer properties

Hi,

Is it possible to transfer a value from a response to several places in a request in a single transfer?

For example:
I want to retrieve a user name from a response and transfer it to the next request where:

User1 (request) = User (response)
User2 (request) = User (response)
User3 (request) = User (response)

And I'd like to do that in a single transfer not in 3.
  • Hi ,

    I am not sure if i understood your question correctly. However from my understanding, you can proceed in this way :
    create a new property variable (lets say we a global property named 'UserVar').
    Now use one single property transfer to update the value of the 'UserVar' with the first response data (or username).

    And this 'UserVar' can be used as input variable across all three following request without any need of any property transfer.

    Do let us know, if this helps? Or help us understand your issue correctly

    Thanks!
    ~~ Pradeep Bishnoi ~~
  • mmoles's avatar
    mmoles
    New Contributor
    Thank you for tour reply.

    I'd like to avoid using variables. To make my request XML easier to read I want to tranfer directly the value from the response to the next request.
    So I still have the question :-)

    Can I transfer in a single step a value from a response to severale places in a request XML?

    Thanks
  • Finan's avatar
    Finan
    Frequent Contributor
    Hi mmoles,

    I'm using the soapUI pro version, so i'm not sure if this will work for the free version.
    1. If you want to past the actual values of the response to other requests in one step, groovy is the way to go. (insert a groovy step after the testStep containing the response and transfer the response content)

    2. If you want to see the request as it was sent to the webservice, you can view this in the raw tab of the request editor. (Instead of on the XML tab)
    You can set the requestdata per xmlelement by rightclicking the element >> getData >> select the step containing the response >> select response >>> select property.

    Also, if you use groovy, you can always loop through all the testSteps that require the response data.