Forum Discussion

soapuitoudaya's avatar
New Contributor
5 years ago

How to copy Request from one soap step to another soap step using Groovy

 Hi Team, 

We are trying to control sending request from Excel Data. 

If excel has "null" for an parameter, we have to remove that element in the request. 

We have written a groovy to remove that by using below code. 


def grUtils = new
def ReqHolderOriginal = grUtils.getXmlHolder("AddOriginal#Request")



It removes perfect, but the problem is, we need that element for next test case. 

Where as i am trying to have two soap requests. 

1. Original 

2. Actual 

Copy Original to Actual and remove the element there and make a call. 


Any help would be really appreciable. 








2 Replies

    • soapuitoudaya's avatar
      New Contributor

      To make the requirement more clear attaching the snippet. 


      In example, 

      AddOriginal will remain same, its just a place holder. Where as AddActual will get updated according to every test case.