【问题标题】:SOAP UI - Not able to authenticate REST APISOAP UI - 无法验证 REST API
【发布时间】:2021-08-13 11:44:00
【问题描述】:

我正在尝试从以下 REST API 请求响应

Request - POST
URL - http://auldslap540.sit.biz:9189/ws/Retrieve-RequestSummary/1.0

传递的标题是(我从日志中得到了这些调试):

SOAPAction: retrieveSummary
User-Agent: Axis2
Content-Type: text/xml; charset=UTF-8

身份验证是 Basic 并传递用户名/密码

传递一个 XML 请求,响应是:

DEBUG: Attempt 1 to execute request
DEBUG:Sending request: POST /ws/Retrieve-RequestSummary/1.0 HTTP/1.1
DEBUG:Receiving response: HTTP/1.1 401 Unauthorized
DEBUG:Connection can be kept indefinitely
DEBUG:Target requested authentication
DEBUG:Authorization challenge processed
DEBUG:Authentication scope: BASIC <any realm> @auldslap540.sit.biz:9189
DEBUG:auldslap540.sit.biz:9189 requires authentication with the realm 'null'
DEBUG:Found credentials
DEBUG:Attempt 2 to execute request
DEBUG:Sending request: POST /ws/Retrieve-RequestSummary/1.0 HTTP/1.1
DEBUG:Receiving response: HTTP/1.1 401 Unauthorized
DEBUG:Connection can be kept indefinitely
DEBUG:Target requested authentication
DEBUG:Authorization challenge processed
DEBUG:Authentication scope: BASIC <any realm> @auldslap540.sit.biz:9189
DEBUG:Authentication failed
DEBUG:Connection closed

根据日志,这在 Java 代码中运行良好。但是从 SOAP UI 中,我得到了上述错误。

任何帮助将不胜感激。

问候 回复

【问题讨论】:

    标签: soapui


    【解决方案1】:

    您是否尝试将身份验证类型更改为 NTLM 而不是 Basic。如果没有,请尝试一次。

    另外,如果您没有在 Rest API 的 Rest Request 测试用例步骤中指定登录凭据,请尝试在 Rest Request 步骤中也指定登录凭据。

    【讨论】:

      猜你喜欢
      • 2013-04-09
      • 1970-01-01
      • 1970-01-01
      • 2020-05-16
      • 2014-05-04
      • 2014-11-28
      • 1970-01-01
      • 2016-04-18
      • 2017-09-04
      相关资源
      最近更新 更多