Using Groovy/Java to pass Read SOAP request through to Update SOAP request in SOAPUI

389 Views Asked by At

Apologies if this has been answered in part elsewhere, but I have looked extensively (albeit I am new to using Soap UI/Ready API, so I am struggling to make sense of some of this...)

I am attempting to recreate a traditional "Update" record function in Soap UI. The steps as I see them are as follows:

  1. Get a record through an SOAP API request step
  2. Read the Response (in a Groovy script)
  3. Create an object for the Update SOAP request
  4. Pass all data from the Read through to the Update object (as yet unchanged)
  5. Amend one or two items of data in the Update object
  6. Call this object from a SOAP API request step

I believe I should be able to achieve this in 3 steps, with 2 through to 5 above in a single Groovy script.

I want to avoid Properties/Transfers as much as possible as these seem to be unable to pass the entire record between the Read and the Update steps, except one data item at a time. If I have multiple large records to be amended, this'll get out of control very quickly.

Ideally in time I would make this generic; the logic work dynamically, parsing the structure of the record that has been Read into the record to be Updated. But at this time I just want to know if the approach detailed above that I would like to implement is possible!

0

There are 0 best solutions below