I am attempting to new-webserviceproxy to use an internal web service to update a ticket in our SeviceNow instance. I can read the new proxy as I can run get-member from it. However, when I try to pass info to it that I want it to update I get an error: “SOAP header action was not understood”. I’ve done some extensive checking online and can’t seem to find a relevant answer. Is it possible to use powershell like this?
Tricky to answer without more details. As long as ServiceNow is providing a proper SOAP endpoint, then it should be possible to do whatever you need to do starting with New-WebServiceProxy, but the steps after that may be tricky.
From what I understand, this is all I should need:
$SN = New-WebServiceProxy –Uri ‘https://mysite.domain.com/ServiceNow/IntegrationService/SNIntegration.svc?wsdl’ -UseDefaultCredential
$SN.UpdateCatalogTask($null,$null,$null,$null,$null) # order of items to update (number,state,description,work_notes,assigned to)
but get:
Exception calling “UpdateCatalogTask” with “5” argument(s): “SOAP header Action was not understood.”
At line:7 char:1
- $SNInt.UpdateCatalogTask($null,$null,$null,$null,$null)
-
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : SoapHeaderException
Thank you for the help!!