Execute a one-way wcf service operation from powershell

后端 未结 5 1736
情歌与酒
情歌与酒 2021-02-06 12:52

I have a scheduled task which executes a powershell script every hour. The powershell script must make a call to a one-way WCF service operation. Essentially it just needs to

5条回答
  •  渐次进展
    2021-02-06 13:36

    PowerShell 2.0 makes this trivial with the New-WebServiceProxy cmdlet e.g.:

    $zip = New-WebServiceProxy -uri http://www.webservicex.net/uszip.asmx?WSDL
    $zip.getinfobyzip(20500).table
    
    CITY      : Washington
    STATE     : DC
    ZIP       : 20500
    AREA_CODE : 202
    TIME_ZONE : E
    

提交回复
热议问题