Showing results for 
Search instead for 
Did you mean: 

Capture request node value with groovy script


Capture request node value with groovy script

Hi All,

I would like to capture the values of Search Node, but the existing code returns me null values. What could be the issue here. I have written this code in ServiceV Pro.


def groovyUtils = new
def holder = groovyUtils.getXmlHolder(mockRequest.requestContent)
def queryString = holder.getNodeValue("//ond:search") "QueryString: " + queryString

Request XML

<soapenv:Envelope xmlns:soapenv="" xmlnsSmiley Surprisednd="">
<ond:QASearch Localisation="" RequestTag="Intuitive">
<ond:search>1 Lonsdale Close, LAKE HAVEN NSW 2263</ond:search>


Senthil kumar.M

New Here?
Join us and watch the welcome video:
Watch the new Interview