SoapUI 脚本

demystify demystify 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我想使用SoapUI来实现一个模拟webService的功能,其中用到根据Request报文的内容,填写Response报文的内容。其他地方都搞定了,但是脚本该怎么写一直搞不定。请诸位帮忙看一下。
首先,我的项目目录很简单,如下


其中只有一个Response报文,内容如下:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis="http://axis2.iis.xxxx.com">
<soapenv:Header/>
<soapenv:Body>
<axis:RequestMessageResponse>
<!--Optional:-->
<axis:return>
<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<header>
<msgType>A</msgType>
<clientID>${CLIENTID}</clientID>
<sendDateTime>${SENDTIME}</sendDateTime>
<IP>${IP}</IP>
<errorCode>0</errorCode>
</header>
<body>
<status>OK</status>
<errInfo></errInfo>
</body>
</root>
]]>

</axis:return>
</axis:RequestMessageResponse>
</soapenv:Body>
</soapenv:Envelope>
其中红色部分是我的业务报文。

如果应答报文中的“CLIENTID”值取请求报文中的“CLIENTID”值,“SENDTIME”值取当前时间戳,“IP”值取请求报文中的“IP”值,那么请问脚本该怎么写呢?
...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
demystify
Web 开发 81,108 成员 341,721 内容