SoapUI 脚本

demystify 2016-06-30 03:43:21
我想使用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”值,那么请问脚本该怎么写呢?
...全文
240 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
demystify 2016-07-04
  • 打赏
  • 举报
回复
demystify 2016-07-01
  • 打赏
  • 举报
回复

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧