I need to extract the session id field from the soap response and use it in other soap requests. I need a groovy script which does this automatically
In the groovy script, the previous step response can be read using below statement. Assuming the step name is step1, rename as per your need. Below script gets the sessionId and store it at test suite level (assuming that sessionId might needed across the test suite, if you want it for all suites, then you can even store it at project level, up to you).
com.eviware.soapui.support.GroovyUtils( context )
holder = groovyUtils.getXmlHolder(
def sessionId = holder.getNodeValue(
Next step is to use the stored sessionId in various places: Property Expansion
In the other steps except groovy:
In the groovy step:
Here is another resource on some code snippets.