wsdl:术语“wsdl”未被识别为 cmdlet 的名称

wsdl:术语“wsdl”未被识别为 cmdlet 的名称

如何使用wsdlWindows 10 中的命令?

PS C:\Users\thufir>
PS C:\Users\thufir> wsdl http://holidaywebservice.com/HolidayService_v2/HolidayService2.asmx
wsdl : The term 'wsdl' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ wsdl http://holidaywebservice.com/HolidayService_v2/HolidayService2.a ...
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (wsdl:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\thufir>

我没有管理员权限。系统信息:

PS C:\Users\thufir>
PS C:\Users\thufir> get-host


Name             : ConsoleHost
Version          : 5.1.14393.1944
InstanceId       : d740419c-8824-4cf5-a0cb-3b26437406bb
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-CA
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace



PS C:\Users\thufir>
PS C:\Users\thufir> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.1944
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1944
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1


PS C:\Users\thufir>

奇怪的是,命令工作正常在 Linux PowerShell 上,但是不是来自 Windows 10

为了保护隐私,我更改了 powershell 提示符: function prompt { "thufir >" } 其pwd形式为: C:\Users\<username> >

答案1

您是否安装了 .NET SDK?首先,您需要检查以下位置是否有 wsdl.exe:

C:\Program Files (x86)\Microsoft SDKs\Windows\<version folder>\bin folder

如果没有,请从 MSDN 网站安装 .NET SDK。

此外,wsdl 命令需要 Web 服务的 WSDL URL,看起来您正在传递 ASMX URL - 这可能没有帮助。在这种情况下,WSDL URL 将是http://holidaywebservice.com/HolidayService_v2/HolidayService2.asmx?wsdl

相关内容