我正在尝试使用基本身份验证来使用 Java Web 服务。
使用 Soap UI,我可以在运行具有基本身份验证的请求时收到响应。
问题是使用 VS studio 我在使用基本身份验证时遇到此错误
“HTTP 请求未经客户端身份验证方案 'Basic' 授权。从服务器收到的身份验证标头是 'Basic realm='weblogic'
enter code here
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>Run Code Online (Sandbox Code Playgroud)
您的传输配置指定了一个空领域,而服务器用户weblogic。尝试添加与 SoapUI 相同的领域,例如:
<transport clientCredentialType="Basic" proxyCredentialType="None" realm="weblogic" />
Run Code Online (Sandbox Code Playgroud)