public void createWitnessNode(NodeDeploymentSpec witnessDeploymentSpec, SourceNodeSpec sourceVcSpec)
 {
     try
     {
         if (this.Client.Version == VimVersion.Vim51)
         {
             throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion));
         }
         if (this.Client.Version == VimVersion.Vim55)
         {
             throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion));
         }
         if (this.Client.Version == VimVersion.Vim60)
         {
             throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion));
         }
         ManagedObjectReference taskReference = this.createWitnessNode_Task(witnessDeploymentSpec, sourceVcSpec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public ManagedObjectReference createWitnessNode_Task(NodeDeploymentSpec witnessDeploymentSpec, SourceNodeSpec sourceVcSpec)
        {
            ManagedObjectReference result;

            try
            {
                if (this.Client.Version == VimVersion.Vim51)
                {
                    throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion));
                }
                if (this.Client.Version == VimVersion.Vim55)
                {
                    throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion));
                }
                if (this.Client.Version == VimVersion.Vim60)
                {
                    throw new NotSupportedException(string.Format(Resources.MethodNotSupported, this.Client.ServiceContent.About.ApiVersion));
                }
                createWitnessNodeRequestType createWitnessNodeRequestType = new createWitnessNodeRequestType();
                createWitnessNodeRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createWitnessNodeRequestType.witnessDeploymentSpec = (VimApi_65.NodeDeploymentSpec)VIConvert.ToWsdlType(witnessDeploymentSpec);
                createWitnessNodeRequestType.sourceVcSpec          = (VimApi_65.SourceNodeSpec)VIConvert.ToWsdlType(sourceVcSpec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.createWitnessNode_Task(new createWitnessNode_TaskRequest(createWitnessNodeRequestType)).createWitnessNode_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }