当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - VMWareLabManagerSoap interface

问题描述:

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?

网友答案:

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:

  1. Select Add Service Reference... under Project
  2. Click Advanced
  3. Click Add Web Reference...

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: