Forum Discussion

senthkum's avatar
5 years ago

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="" xmlns:ond="">
<ond:QASearch Localisation="" RequestTag="Intuitive">
<ond:search>1 Lonsdale Close, LAKE HAVEN NSW 2263</ond:search>


Senthil kumar.M

1 Reply

  • nmrao's avatar
    Champion Level 3
    This is very late reply due to incorrect forum. Do you still have issue? Are you using the above in Script Dispatch?