无法从JMeter授权到WCF基本身份验证Web服务 [英] Cannot authorize to WCF Basic Authentication Web Service from JMeter
本文介绍了无法从JMeter授权到WCF基本身份验证Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用JMeter对具有基本身份验证的WCF Web服务运行测试,该服务工作正常并且凭据正确(我从SOAPUI成功运行它们)。
根据我的所有研究,我已经配置了‘HTTP Header Manager’和‘HTTP Basic身份验证’,在提交时,我看不到实际的HTTP Header有任何错误:
我到目前为止所做的工作:
- 已通过解码Base64字符串验证凭据是否正确
- 启用'serviceSecurityAudit' on the service itself导致以下应用程序错误:
下面是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>
我已经在下面包含了绑定配置,它使用标准的基本Https绑定(不是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服务可能具有不同的身份验证类型,您收到的错误是关于WS-Security头丢失或不正确。
有多种方法可以将头文件添加到请求中,您可以尝试使用支持某些身份验证类型的JMeterSoapPlugin。 您还可以查看Take the Pain out of Load Testing Secure Web Services,以了解如何绕过不同类型的Web服务身份验证。这篇关于无法从JMeter授权到WCF基本身份验证Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文