VMWareLabManagerSoap 接口
我正在尝试连接到 Lab Manager SOAP API,并按照 API 指南中的说明进行操作: http://www.vmware.com/pdf/labmanager_SOAP_API_Guide.pdf。
但是,我在 Visual Studio 中不断收到错误消息:
错误 1 命名空间“ConsoleApplication1.LabManagerSoap”中不存在类型或命名空间名称“VMwareLabManagerSOAPinterface”(您是否缺少程序集引用?)C:\Documents and Settings\ llaskin\My Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs 24 52 ConsoleApplication1
“VMwareLabManagerSOAPinterface”定义直接从上面引用的 PDF 中剪切和粘贴而来。有人可以提供指导吗?
I'm trying to connect to the Lab Manager SOAP API and have followed the instructions in the API guide: http://www.vmware.com/pdf/labmanager_SOAP_API_Guide.pdf.
However, I constantly get an error in Visual Studio that says:
Error 1 The type or namespace name 'VMwareLabManagerSOAPinterface' does not exist in the namespace 'ConsoleApplication1.LabManagerSoap' (are you missing an assembly reference?) C:\Documents and Settings\llaskin\My Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs 24 52 ConsoleApplication1
The definition "VMwareLabManagerSOAPinterface" comes directly as a cut and paste from the PDF referenced above. Can anyone provide guidance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这是一年多前提出的问题,但是我刚刚遇到了同样的问题,我相信其他人将来可能会遇到这个问题。
我认为 LabManager 的 SOAP API 基于 .NET 2.0,这可能会导致兼容性问题。为了在 VS2010 中生成具有 2.0 兼容性的类引用:
” 从这里您可以按照从步骤 4 开始的“添加 Web 引用”说明进行操作, “在 URL 文本框中...”,可在 SOAP API 指南中找到。
这应该在您的项目中生成一个 Reference.cs 文件,其中包含 LabManager API Soap 指南中描述的方法,包括 LabManagerSOAP 接口类。
I know this was asked over a year ago, however I was just encountering the same issue and I'm sure others may encounter this issue in the future.
LabManager's SOAP API I believe is based on the .NET 2.0 and this may be causing compatibility issues. In order to generate the class references with 2.0 compatibility in VS2010:
From here you can follow the "To add a Web Reference" instructions starting at step 4, "In the URL text box...", found in the SOAP API Guide.
This should generate a Reference.cs file in your project that contains the methods described in the LabManager API Soap guide, including the LabManagerSOAPinterface class.