Calling webservices using Powershell

1

I am using the following code to perform a function using web services from a running application. I am using a Linux client. Below is a part of the script that I need to convert to a Powershell equivalent, I am using "curl":

CallGetMeterPrograms()
{
cat /dev/null > $WORKINGDIR/CallPCMeterPrograms-output
cat /dev/null > $WORKINGDIR/outPCGetMeterPrograms.xml
TARGET="https://server01/ProgramManager_v1_0.wsdl"
TIMEOUT=600

curl  --user "${AUTHENTICATION}"  --header "Content-Type: text/xml;charset=UTF-8" --header "Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" --header  "SOAPAction: \"\"" --insecure --data @$ROOTDIR/GetPCRequest.xml  "${TARGET}"  --output $WORKINGDIR/CallGetPCPrograms-output.xml

xmllint --format $WORKINGDIR/CallGetPCPrograms-output.xml > $WORKINGDIR/outCallGetPCPrograms.xml
}

Bermelian

Posted 2019-06-13T03:04:54.470

Reputation: 11

I am also interested in it's equivalent in Python also. Any help would be appreciated – Bermelian – 2019-06-17T23:54:49.487

No answers