我正在尝试使用Jmeter测试web服务。.I服务受NTLM身份验证(Windows)保护,windows可以使用WebService(SOAP) Request采样器加载WSDL。目前,只有当我使用代理服务器和这个SO answer中提到的BurpSuit (而不是SOUP UI,我使用Jmeter和BurpSuite)时,它才能工作。
但我不想使用代理服务器,而是直接在Jmeter中使用带NTLM身份验证的web服务。我已经尝试过带ntlm身份验证的HTTP Authentication Manager。但它仍然会在响应中给出401 Authorization Required
谢谢你的帮助。
采样器结果。
Thread Name: WebSVC 1-1
Sample Start: 2010-06-28 13:54:08 IST
Load time: 752
Latency: 0
Size in bytes: 401
Sample Count: 1
Error Count: 0
Response code: 200
Response message: OK
Response headers:
Date=Mon, 28 Jun 2010 08:24:08 GMT
Server=Apache/2.2.9 (Unix) DAV/2 mod_jk/1.2.26
Connection=close
WWW-Authenticate=NTLM
SampleResult fields:
ContentType: text/html; charset=iso-8859-1
DataEncoding: iso-8859-1和响应
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>发布于 2010-07-09 14:58:54
我设法在启用了Use keepAlive选项的情况下使用SOAP/XML-RPC Request Sampler (当然是在HTTP Authentication Manager的帮助下)。
发布于 2012-07-26 20:24:34
您可以将安全参数添加到标头中。
<soapenv:Header> <wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>USERNAME_PARAM</wsse:Username>
<wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD_PARAM</wsse:Password>
</wsse:UsernameToken>
</wsse:Security> 发布于 2010-07-09 05:28:54
在HTTP授权管理器中,您是否为"Base URL“字段提供了一个值?
如果是,它的格式是:https://${soap_domain} (注意安全的http)。
我的授权失败问题困扰了我一段时间,但我发现一个快速的解决办法是将基本url字段留空,只提供用户名和密码。
https://stackoverflow.com/questions/3130415
复制相似问题