如何在Windows应用程序项目中使用soapclient调用服务现在的Web服务?

时间:2013-12-11 14:29:10

标签: winforms siteminder servicenow

我正在关注this文件。

我已将服务引用添加到我的应用程序中并调用了getRecords Web方法,但在调用该方法时出现以下错误:

  

“HTTP请求未经授权使用客户端身份验证方案   “基本”。从服务器收到的身份验证标头是'BASIC   境界= “服务现在””“。

代码:

ServiceNowSLA.ServiceNowSoapClient Obj = new ServiceNowSLA.ServiceNowSoapClient();
ServiceNowSLA.getRecords RecObj = new ServiceNowSLA.getRecords();
Obj.ClientCredentials.UserName.UserName = "ABC";
Obj.ClientCredentials.UserName.Password = "xyz";
Obj.getRecords(RecObj); => **at this line i am getting the error..**

根据我的发现,我必须进行站点管理员身​​份验证以重新发送此错误,但我无法这样做。 你可以帮我解决这个问题吗?

先谢谢。

0 个答案:

没有答案