Hi,
Here is my SOAP Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
<soapenv:Header/>
<soapenv:Body>
<web:GetUKLocationByPostCode>
<!--Optional:-->
<web:PostCode>33</web:PostCode>
<web:county>Manipal</web:county>
</web:GetUKLocationByPostCode>
</soapenv:Body>
</soapenv:Envelope
// //I need to get the Postcode value/text.so here is my Groovy Snippet To get the Postcode Text /Value ..But it didn't work...Because Of the presence of ":".
def output = ""
def rootNode = new XmlSlurper().parseText(xml)
rootNode.each {
output += it.text().trim()
}
log.info(output)
log.info(rootNode.soapenv:Envelope.soapenv:Header.soapenv:Body.web:GetUKLocationByPostCode.web:PostCode.text())
But the same code works fine with the Normal XML (i.e, Doesn't contain ":" ).
So, how to get the Postcode.
Regards,
Franky.






