This is probably a very easy one for all SoapUI regulars.
In a SoapUI mock service response script, how do I extract the value inside the request I\'m replying to?<
If you want to access SOAP request and do some XPath processing, there's an easier way to do it in soapUI thanks to the power of GPath and XmlSlurper.
Here's how you would access the customer number:
def req = new XmlSlurper().parseText(mockRequest.requestContent)
log.info "Customer #${req.foo.data.CustomerNumber}"
As of Groovy 1.6.3 (which is used in soapUI 2.5 and beyond), XmlSlurper runs in namespace-aware and non-validating mode by default so there's nothing else you need to do.
Cheers!
Shonzilla