java 测试 Web 服务时在 SOAP UI 中进行身份验证
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14377550/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Authentication in SOAP UI while testing web services
提问by Patan
I am using SOAP UI for testing the web services. In the Authentication tab, I have entered the username and password and domain name.
我正在使用 SOAP UI 来测试 Web 服务。在身份验证选项卡中,我输入了用户名和密码以及域名。
Sample:
WSDL URL: http://localhost:8080/soap/helloTest?wsdl
Username:hello
pass:helloworld
domain: http://mysysfullname:8080
I have given the correct credentials. I also replaced domain as http://localhost:8080
.
我已经给出了正确的凭据。我也将域替换为http://localhost:8080
.
Even then I am getting invalid credentials only. The username and password are correct and they are not my windows credentials.
即使那样,我也只会收到无效的凭据。用户名和密码是正确的,它们不是我的 Windows 凭据。
Can some one help how to give the credentials.
有人可以帮助如何提供凭据。
Adding Raw Request
POST http://localhost:8080/soap/helloTest HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8080
Content-Length: 1004
Thanks.
谢谢。
采纳答案by TheWhiteRabbit
It also depends on the WSS-PasswordType
它还取决于WSS-PasswordType
verify that also.
也验证一下。
回答by Florin
Try setting SOAP-UI to use PreemptiveAuthorisation Type.
尝试将 SOAP-UI 设置为使用抢占式授权类型。
As per SOAP-ui documentation:
根据 SOAP-ui 文档:
Send Authentication headers with each request without first receiving an authentication challenge. This is a potential security hazard but will improve performance since only one request will be required for authenticated endpoints instead of two.
在没有首先收到身份验证质询的情况下,随每个请求发送身份验证标头。这是一种潜在的安全隐患,但会提高性能,因为经过身份验证的端点只需要一个请求,而不是两个。