SoapUI WS-安全 token

标签 soapui wsse

我想对使用 WS-Security 和 SoapUI 的 Web 服务进行调用。到目前为止,SoapUI 教程还没有成功。希望有任何建议。

最佳答案

回去查看SoapUI's documentation第二次就没有问题了。不知道我错过了什么。我想我可能错过了网络服务所需的时间戳。

在 SoapUI 中,我添加了一个传出 WS-Security 配置,其中包含名称、用户名、密码,并且选中了 Must Understanding。

然后,我必须将时间戳和用户名 WSS 条目添加到 WSS 配置中。时间戳为 10000 MS。用户名条目已选中用户名、密码、添加随机数和添加创建。密码类型设置为PasswordText。然后,我进入特定请求并添加基本授权(请求底部的“Auth”选项卡),然后选择“传出 WSS”作为我所做配置的名称。一些示例应用程序 (VB.NET) 代码如下所示:

Dim client As New clientService
client.Url = getUrl()
Dim userToken As New UsernameToken(Username, Password, Tokens.PasswordOption.SendPlainText)
Dim requestContext As SoapContext = client.RequestSoapContext
requestContext.Security.Timestamp.TtlInSeconds = 60
requestContext.Security.Tokens.Add(userToken)
client.fooBar()

不过,我不需要签名、加密等,因此需求会根据这些选项而有所不同。我会注意到,我确实通过 SSL 调用此服务。

关于SoapUI WS-安全 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23636936/

相关文章:

java - 通过 SoapUI 发送消息

android - 如何在 iOS 中使用 WSSE 和 salted sha512 超过 1 次迭代

Python 使用 BinarySecurityToken 签署 SOAP 请求

Symfony3 文档 WSSE 失败 "Cannot replace arguments if none have been configured yet"

php - 检查 WS* 服务器实现中的签名

xpath - 如何将 Query_Match 用于 Soap UI

java - 基于接受参数的 REST 服务响应

testing - 在 SoapUI 的 WSDL 位置输入 URL 时出错

groovy - SoapUI 如何通过 Groovy 脚本更新 WSDL 定义和重新创建请求