Получить ошибку (в XML-документе (3, 4) имеется ошибка) при использовании веб-службы BMC ITSM HelpDesk_QueryList_Service

Я использую 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)

Исключение вызывает "HelpDesk_QueryList_Service" с аргументом (ами) "3": "В документе XML есть ошибка (3, 4)". В строке:1 символ:1

$answer=$itsm.HelpDesk_QueryList_Service($criteria,0,100)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~

CategoryInfo: NotSpecified: (:) [], исключение MethodInvocationException

FullyQualifiedErrorId: InvalidOperationException

Кто-нибудь знает, что может быть не так?

0 ответов

Другие вопросы по тегам