我正在使用 powershell cmdlt New-WebServiceProxy 来查询 ITSM 事件。我能够获得 WSDL 定义..
$uri='http://pitsm.mydomain.net/arsys/WSDL/public/pitsmapp/HPD_IncidentInterface_WS'
$itsm=New-WebServiceProxy -Uri $uri -Namespace ITSM
$auth= New-Object ITSM.AuthenticationInfo
$cred=get-credential
$auth.username=$cred.username
$auth.password= [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($cred.password))
$auth.authentication="Domain Authentication"
$itsm.AuthenticationInfoValue=$auth
$itsm.RequestEncoding = [System.Text.Encoding]::UTF8
$tid="INC000002237910"
$criteria="'Incident Number' = ""$tid"""
当我现在使用网络服务时,我收到一条错误消息:
$answer=$itsm.HelpDesk_QueryList_Service($criteria,0,100)
使用“3”参数调用“HelpDesk_QueryList_Service”的异常:“XML 文档 (3, 4) 中存在错误。” 在行:1 字符:1
$answer=$itsm.HelpDesk_QueryList_Service($criteria,0,100)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
CategoryInfo : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : InvalidOperationException
有人知道可能出了什么问题吗?