【发布时间】:2014-01-22 08:42:01
【问题描述】:
所以我想做的是自动将 SOAP 标头添加到在 SoapUI 中生成的每个请求中,因为我有数百个请求并且手动执行此操作很烦人。
假设这是我从 WSDL 生成的示例请求,如下所示:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pol="http://something">
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<pol:GetSomething>
<tag1>3504</tag1>
<tag2>ALL</tag2>
</pol:GetSomething>
</soapenv:Body>
</soapenv:Envelope>
当我提出请求时,我希望 SoapUI 将其修改为如下所示:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pol="http://something">
<soapenv:Header>
<token xmlns="ns1">${TOKEN}</token>
<user xmlns="ns2">user</user>
<system xmlns="ns3">system</system>
</soapenv:Header>
<soapenv:Body>
<pol:GetSomething>
<tag1>3504</tag1>
<tag2>ALL</tag2>
</pol:GetSomething>
</soapenv:Body>
</soapenv:Envelope>
在 SoapUI 中可以吗?
【问题讨论】: