Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 230200

Re: vCenter Converter API with Ruby

$
0
0

Login expects the session manager. Here is a snippet of C# code for illustration:

            ManagedObjectReference morServiceInstance = new ManagedObjectReference();

            morServiceInstance.type = "ConverterServiceInstance";

            morServiceInstance.Value = "ServiceInstance";

            _converterService = new ConverterService();

            _converterService.Url = serverUrl;

            _converterService.CookieContainer = new System.Net.CookieContainer();

            ServicePointManager.ServerCertificateValidationCallback =

               new RemoteCertificateValidationCallback(RemoteCertificateValidation);

            _converterServerContent = (ConverterServerContent)_converterService.ConverterRetrieveServiceContent(morServiceInstance);

            _userSession = _converterService.ConverterLogin(_converterServerContent.sessionManager, username, password, null);

 

However this example uses generated stub classes, I don't know how it looks in XML as a SOAP request.


Viewing all articles
Browse latest Browse all 230200

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>