Forum Discussion
M_McDonald
15 years agoSuper Contributor
I put it all in a Groovy script and it seems to work:
returns
[tt:23s6pby9]Tue Dec 08 15:01:48 EST 2009:INFO:98
Tue Dec 08 15:01:48 EST 2009:INFO:5[/tt:23s6pby9]
def xml = '''<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<RunScript xmlns="http://tempuri.org/">
<optionObject>
<EntityID>5</EntityID>
<Facility>98</Facility>
</optionObject>
</RunScript>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>'''
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( xml )
holder.declareNamespace( 'ns', 'http://tempuri.org/')
log.info holder.getNodeValue( "//ns:Facility")
log.info holder.getNodeValue( "//ns:EntityID")
returns
[tt:23s6pby9]Tue Dec 08 15:01:48 EST 2009:INFO:98
Tue Dec 08 15:01:48 EST 2009:INFO:5[/tt:23s6pby9]
Related Content
Recent Discussions
- 11 hours agoruchisingh