soap - 如何使用groovy在soapUi中的所有请求中添加自定义安全标签
问题描述
我必须在标头内的所有请求中插入安全标签。我如何实现自动化?因为对于每个请求,我都必须手动复制过去,这需要时间来完成所有请求
以下是实际请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.test.sample.com/" xmlns:ws1="http://ws.test.sample.com/">
<soapenv:Header>
</soapenv:Header>
添加安全标签后:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ws="http://ws.test.sample.com/" xmlns:ws1="http://ws.test.sample.com/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://doc.test.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://doc.test.xsd">
<wsse:Username>test</wsse:Username>
<wsse:Password Type="http://doc.test.xsd">o9j1/hA/mkFTG0ODti</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
解决方案
推荐阅读
- javascript - Memory overflowing by using roi() function Opencv on Javascript
- php - Configure .htaccess to process segments of the URL
- c# - Why is there no prism region registred in my regionManager?
- mysql - 谷歌云功能 - 存储过程未运行
- python - Stopping a switch from Pox controller
- c# - Out of memory when create big array [,]
- mysql - How to create an SQL stored procedure to insert multiple values
- javascript - 在 JavaScript 类中,您需要始终调用 super 吗?对这个说法感到困惑
- php - 在类的构造函数中为类属性分配函数?
- c - 使用全局指针变量访问静态值是否有效?