UnnounUsername
4 years agoOccasional Contributor
Property Transfers get sid from the CDATA
Hi all, can anybody halp with such problem. I got the response and now need to get sid (YkhXK0uq6HBPvn3zAAAE) from the xml CDATA
<data contentType="text/plain; charset=UTF-8" contentLength="97"><![CDATA[0{"sid":"YkhXK0uq6HBPvn3zAAAE","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":20000}]]></data>
i tried this one (based on this)
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def response = context.expand('${GET GetSID#ResponseAsXml}')
def holder = groovyUtils.getXmlHolder(response)
node_data = holder.getNodeValue("//data")
context.sid = node_data.replaceAll("sid:", "");
log.info context.sid
but it leds to error
is it possible to get sid without groovy just to use the Property Transfers ?