Helper Classes for C#
Sample Applications in the Web Services SDK
The C# sample applications included with the
vSphere Web Services SDK include C# helper classes that handle the details of
creating sessions, obtaining session tokens, saving the session token as a
string to a file, and reusing the session. The Microsoft .NET Web services
implementation uses the
Cookie
class to handle the session
information from the server.
The helper classes (listed in the following
table) handle command-line input such as common parameters, server name, and
other details. These helper classes are located in the unpacked C# version of
the SDK download, in this location:
C# Helper
Classes
%SDKHOME%\vsphere-ws\dotnet\cs\samples\AppUtil
AppUtils
| Functional Description
|
---|---|
AppUtil.cs
| Convenient methods you
can use to handle user input from command line. Catches errors (faults). Logs
output to console.
|
AppUtil.csproj
| Convenient methods you
can use to handle user input from command line., built to run on versions of
Microsoft Visual Studio that were released before 2008.
|
ArgumentHandlingException.cs
| Convenient methods you
can use to handle exceptions.
|
CertPolicy.cs
| Convenient methods you
can use to customize certificate error messages.
|
ClientUtil.cs
| Convenient methods you
can use to handle user input from command line. Catches errors (faults). Logs
output to console.
|
CustomSecurity.cs
| Convenient methods you
can use to override the SOAP security filter.
|
CustomSecurityAssertionBearer.cs
| Convenient methods you
can use to create a custom policy assertion that applies security to a SOAP
message exchange.
|
Log.cs
| Convenient methods you
can use to create a log file or send log output to the console.
|
OptionSpec.cs
| Helper class for
handling default and custom command-line arguments.
|
PropertyManager.cs
| Convenient methods you
can use to listen for Property Manager updates.
|
ServiceUtil.cs
| Wrapper methods for the
vimService methods
(the local proxy code methods) for API 2.0 and prior releases.
|
SvcConnection.cs
| Convenient methods you
can use to create a Web service connection handler.
|
TrustAllCertificatePolicy.cs
| Creates an instance of
local proxy for connecting to the server, and obtains managed object references
to several needed managed objects—
ServiceInstance ,
ServiceContent ,
rootFolder .
|
VersionUtil.cs
| Convenient methods you
can use to retrieve the namespace and API version.
|
VMUtils.cs
| Convenient methods you
can use to create a virtual machine configuration spec.
|