SoapUI WS-Security令牌

kak*_*dge 5 soapui wsse

我想对使用SoapUI的WS-Security的Web服务进行调用.到目前为止,SoapUI教程没有运气.会喜欢任何建议.

kak*_*dge 6

回过头来看看SoapUI的文档并且第二次没有问题.不确定我错过了什么.我想我可能错过了Web服务所需的时间戳.

在SoapUI中,我添加了一个Outgoing WS-Security Configuration,其中包含名称,用户名和密码,我选中了Must Understand.

然后,我必须在WSS配置中添加Timestamp和Username WSS条目.时间戳是10000 MS.用户名条目包含用户名,密码,添加Nonce选中和Add Created选中.密码类型设置为PasswordText.然后我进入了特定的请求并添加了一个基本授权(请求底部的Auth选项卡),并选择了Outgoing 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()
Run Code Online (Sandbox Code Playgroud)

我不需要签名,加密等,因此需求会因这些选项而异.我会注意到,我确实通过SSL调用此服务.