【问题标题】:PowerShell + BMC Remedy + Web ServicesPowerShell + BMC 补救措施 + Web 服务
【发布时间】:2012-03-30 17:04:30
【问题描述】:

在使用任何 Remedy Web 服务时,我在插入身份验证信息时遇到了相当大的困难。

$URL = "https://itsm.url.com/arsys/WSDL/public/server_name/HPD_IncidentInterface_WS";
$URI = New-Object System.Uri($URL);
$ITSM = New-WebServiceProxy -Uri $URI -Namespace ITSM;
$Credentials = New-Object ITSM.AuthenticationInfo;
$Credentials.userName = "UserName";
$Credentials.password = "PassworD";
$Credentials.authentication = '';
$ITSM.AuthenticationInfoValue = $Credentials;

代码在显示的最后一行终止。 这是生成的错误消息:

Exception setting "AuthenticationInfoValue": "Cannot convert the "ITSM.AuthenticationInfo" value
of type "ITSM.AuthenticationInfo" to type "ITSM.AuthenticationInfo"."
At C:\\ITSM Automation\Automate Incident Modification.ps1:45 char:8
+     $ITSM. <<<< AuthenticationInfoValue = $Credentials;
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException

“无法将“ITSM.AuthenticationInfo”类型的“ITSM.AuthenticationInfo”值转换为“ITSM.AuthenticationInfo”类型。” ...嗯什么?如何解决这个问题?

如果有人有想法,我会全力以赴。

'New-WebServiceProxy'函数可以在here找到。

【问题讨论】:

    标签: web-services soap powershell remedy


    【解决方案1】:

    在会话中重复使用相同的Namespace 值时,WebServiceProxy 报告了一个错误。如果遇到此问题,您可以关闭并重新打开 powershell,或者避免使用 -Namespace 参数。

    请参阅Microsoft Connect 上的错误报告。

    【讨论】:

    • 是否有任何更新是否已修复或有任何可用的解决方法?链接的站点重定向到未找到的页面。
    猜你喜欢
    • 2011-06-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-06
    相关资源
    最近更新 更多