0

我已经发送了一个soap服务,我必须在qaf中发送基本身份验证(用户名和密码)以及请求和标头值。我尝试在 application.properties 文件中添加用户名和密码,但该服务引发内部服务器错误。请指导我如何做到这一点。

4

1 回答 1

0

If it is basic authentication you can try providing credential in url, For example: http://user:pwd@url.com. Other alternate is register client that takes care of authentication using property rest.client.impl. Few of ready to use implementations are available with qaf-support-ws library. You can try BasicAuthRestClient as below:

rest.client.impl=com.qmetry.qaf.automation.rest.client.BasicAuthRestClient
rest.client.basic.auth.username=username
rest.client.basic.auth.password=password

This should work for any webservice call regardless of type rest or soap. Keep in mind that in case of soap, method always be POST

于 2019-01-11T18:14:10.080 回答