I use code below to get value of JSESSIONID
from request in SoapUI
.
def setCookie = testRunner.testCase.testSteps["Request1"].testRequest.response.responseHeaders["Set-Cookie"]
re = /(JSESSIONID=[A-Za-z0-9]+)/
matcher = ( setCookie =~ re )
def jsesid = matcher[0][0]
log.info "$jsessid"
props = testRunner.testCase.getTestStepByName("Properties");
props.setPropertyValue('cookie',"$jsessid");
I put this variable in other requests' headers, but get a new JSESSIONID in response. So I lost session, because a new one is opened.