Any update on this? So many people have asked for this feature. Are we to basically build a whole java class to accomplish this?
I am able to, for example grab text from XML and use a split command to narrow down the text I want (auth token) but I cannot figure out how to add it to a request. This is for SOAP. I repeat SOAP. so many helpful tips for REST, nothing for SOAP.
SOAP Going to provide a step by step guide to do a basic transfer from response body to message body. I am sure there are several ways to do it. Here is one. The Soap call I will use as an example is a GetAccessToken.
Step1 (Make empty globalvariable slot): open up default profile (or whatever you use for execution)
make a new global variable called token and set it to empty string. Save and then refresh project.
Step2(set up global variable on call):
import internal.GlobalVariable as GlobalVariable
RequestObject request = WSResponseManager.getInstance().getCurrentRequest()
ResponseObject response = WSResponseManager.getInstance().getCurrentResponse()
//Get element to be transfered(can also use xmlparser to achieve)
String Token = (WS.getElementText(response,‘GetAccessTokenResponse.GetAccessTokenResult.Token’))
//How did I get the element I want to transfer in format Katalon wants?
//Hover over to understand how to write
//Sets Global Variable
GlobalVariable.Token = Token
//What it looks like in call scriptview
Transfer Token into next call(which is a createShoppingCart call)
Step3(add a local variable linked to globalvariable made in step1):
Step4(Add local variable to request):
Step5(create a test case and run both calls):