【发布时间】:2017-07-07 08:53:13
【问题描述】:
我正在使用 JMeter 对具有基本身份验证的 WCF Web 服务运行测试,该服务正在运行并且凭据正确(我从 SOAPUI 成功运行它们)。
根据我的所有研究,我已经配置了“HTTP 标头管理器”和“HTTP 基本身份验证”,并且在提交时我看不到实际的 HTTP 标头有任何问题:
到目前为止我做了什么:
- 通过解码 base64 字符串验证凭据是否正确
- 启用'serviceSecurityAudit' on the service itself 导致以下应用程序错误:
在对 SOAPAction 进行一些操作后,我将其与有效的 SOAPUI 对齐,但 JMeter 基本身份验证仍然失败:
HTTP 响应如下,但它是标准的(当我故意输入错误的凭据时,我从 SOAPUI 得到这个)
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:InvalidSecurity</faultcode><faultstring xml:lang="en-ZA">An error occurred when verifying security for the message.</faultstring></s:Fault></s:Body></s:Envelope>
我在下面包含了使用标准 basicHttpsBinding(不是 wsHttpBinding)的绑定配置:
<service name="PayM8.Axis.PaymentsService.V1.HyperLink.HyperLinkService">
<endpoint address="" binding="basicHttpsBinding" bindingConfiguration="DefaultHttpsBinding"
contract="PayM8.Axis.PaymentsService.V1.HyperLink.IHyperLinkService"/>
</service>
<basicHttpsBinding>
<binding name="DefaultHttpsBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Basic" />
</security>
</binding>
</basicHttpsBinding>
知道我的 JMeter 基本身份验证 HTTP 请求可能有什么问题吗?
【问题讨论】:
标签: web-services wcf jmeter basic-authentication