我必须模拟一个soap webservice操作,它将字符串数组作为输出返回。我只能从下面的脚本生成一个字符串作为输出。 欢迎任何帮助。
//script
import groovy.xml.MarkupBuilder
// An array from which county and city will be drawn randomly
def countryArray =
["ONE",
"TWO",
"THREE"
]
context.countryArray=countryArray
- 响应定义
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:upm="http://xxxx">
<soapenv:Header/>
<soapenv:Body>
<upm:signResponse>
<upm:signReturn>${countryArray}</upm:signReturn>
</upm:signResponse>
</soapenv:Body>
</soapenv:Envelope>