<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Problems connecting to VI SDK using C++/gsoap-2.7 in vSphere Management SDK Documents</title>
    <link>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/ta-p/2788120</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I know this topic has been discussed quite a lot recently, but&amp;nbsp; unfortunately I haven't been able to find a solution to my problem.&amp;nbsp; I&amp;nbsp; am currently running ESX Server 3.5.&amp;nbsp; I have no problems accessing it&amp;nbsp; via the SDK using Java and Perl.&amp;nbsp; However, I am trying to get a simple&amp;nbsp; C++ program working that can connect to it and do something useful.&amp;nbsp;&amp;nbsp; First of all, I changed the proxy.xml file on the ESX Server so that the&amp;nbsp; sdk can be accessed via both http and https.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, on my client machine (64-bit AMD Athlon running Ubuntu 8.10) I&amp;nbsp; have installed gsoap-2.7 to convert the WSDL files into stubs necessary&amp;nbsp; to communicate with the server.&amp;nbsp; I use the various gsoap programs to&amp;nbsp; convert the vimService.wsdl file in the directory SDK/wsdl/vim/ as&amp;nbsp; follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wsdl2h -x -s vimService.wsdl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;soapcpp2 -i -C -I/home/ashok/gsoap-2.7/gsoap/import vimService.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This generates soapH.h, soapStub.h, soapC.cpp, as well as soapVimBindingProxy.{h,cpp}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my simple test.cpp driver program that tries to access the ESX&amp;nbsp; Server and create a snapshot of one of the VMs (note that I've specified&amp;nbsp; http and not https in the URL):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;#include "soapH.h"&lt;/P&gt;&lt;P&gt;#include "VimBinding.nsmap"&lt;/P&gt;&lt;P&gt;#include "soapVimBindingProxy.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main() {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VimBindingProxy service;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;service.soap_endpoint = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server ip address&amp;gt;:443/sdk";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ns2__ManagedObjectReference mor;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ns2__CreateSnapshotRequestType req;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_ns2__CreateSnapshotResponse resp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;req._USCOREthis = &amp;amp;mor;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;req.name = "ashok_linux_1";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;req.memory = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;req.quiesce = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (service.CreateSnapshot(&amp;amp;req, &amp;amp;resp) == SOAP_OK) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; "OK"&amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; "BAD" &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;service.soap_print_fault(stdout);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I compile this and run as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g++ *.cpp -Wall -DWITH_OPENSSL -lgsoap++&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok@ashok-desktop: ./a.out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error -1 fault: SOAP-ENV:Client&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no subcode"&gt;no subcode&lt;/A&gt;&lt;/P&gt;&lt;P&gt;"End of file or no input: Connection reset by peer"&lt;/P&gt;&lt;P&gt;Detail: &lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no detail"&gt;no detail&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message "Error -1 fault: SOAP-ENV:Client&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no subcode"&gt;no subcode&lt;/A&gt;"&amp;nbsp; is something that I always&amp;nbsp; get, regardless of the SDK function that I&amp;nbsp; invoke.&amp;nbsp; Has anyone figured out this problem, specifically using the C++&amp;nbsp; stub functions auto-generated by gsoap?&amp;nbsp; If so, please tell me what I'm&amp;nbsp; doing wrong as I'm close to pulling my hair out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I think I'm going to write up a tutorial for C++ &amp;amp; gsoap to get&amp;nbsp; people started.&amp;nbsp; I got a working setup that will build libraries and use&amp;nbsp; the advanced C++ proxy option.&amp;nbsp; This generates more OO like code that&amp;nbsp; (in my opinion) reads and is easier to code with.&amp;nbsp; I'll post it up in&amp;nbsp; this thread if I do get to it this week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thing is you'll need to login first.&amp;nbsp; You won't be able to call most of the functions in the SDK until you do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll also need to keep the compile flags consistent for all the&amp;nbsp; objects.&amp;nbsp; You'll need at least -DWITH_COOKIES.&amp;nbsp; Without cookies you'll&amp;nbsp; end up with permission errors as you end up regenerating a new SessionID&amp;nbsp; for each call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you also post up all the steps in your compile process?&amp;nbsp; It wasn't clear if you compiled and linked in your soapC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a very simple example you can work from.&amp;nbsp; I don't call a login in&amp;nbsp; this one, but you can use it to get a working program and start to&amp;nbsp; build on it.&amp;nbsp; It does use SSL so you can see how that's handled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;#include "soapVimBindingProxy.h"&lt;BR /&gt;#include "VimBinding.nsmap"&lt;BR /&gt;#include &amp;lt;time.h&amp;gt;&lt;BR /&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#include &amp;lt;typeinfo&amp;gt;&lt;BR /&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;void sigpipe_handle(int x) { cout &amp;lt;&amp;lt; "sigpipe: " &amp;lt;&amp;lt; x &amp;lt;&amp;lt; endl; }&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char* argv[])&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VimBinding vim;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ns1__ManagedObjectReference ManagedObjectRef;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ns1__RetrieveServiceContentRequestType RetrieveServiceContentReq;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_ns1__RetrieveServiceContentResponse RetrieveServiceContentRes;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ns1__ServiceContent *ServiceContent;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ns1__AboutInfo *AboutInfo;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (argc != 2)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "Usage: " &amp;lt;&amp;lt; argv[0] &amp;lt;&amp;lt; " &amp;lt;service url&amp;gt;" &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string service_url(argv[1]);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vim.endpoint = service_url.c_str();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_ssl_init();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (soap_ssl_client_context(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vim.soap,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SOAP_SSL_NO_AUTHENTICATION,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "SSL:";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_print_fault(vim.soap, stderr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_done(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_end(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ManagedObjectRef.__item = "ServiceInstance";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ManagedObjectRef.type = new string("ServiceInstance");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RetrieveServiceContentReq._USCOREthis = &amp;amp;ManagedObjectRef;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ( vim.__ns1__RetrieveServiceContent(&amp;amp;RetrieveServiceContentReq, &amp;amp;RetrieveServiceContentRes) == SOAP_OK )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "RetrieveServiceContent - OK" &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;delete ManagedObjectRef.type;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_print_fault(vim.soap,stderr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_done(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_end(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ServiceContent = RetrieveServiceContentRes.returnval;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (ServiceContent &amp;amp;&amp;amp; ServiceContent-&amp;gt;about)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AboutInfo = ServiceContent-&amp;gt;about;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "fullName: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;fullName &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; name: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;name &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; build: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;build &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; version: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;version &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; apiType: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;apiType &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; productLineId: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;productLineId &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;delete ManagedObjectRef.type;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_done(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_end(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Thank you very much for your response.&amp;nbsp; I am looking forward to reading&amp;nbsp; your C++/gsoap "Getting Started" tutorial.&amp;nbsp;&amp;nbsp; I will try working with the&amp;nbsp; template code you provided, but I first tried adding login capability&amp;nbsp; to my original test program.&amp;nbsp; My program (test.cpp) now looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;#include &amp;lt;cstdlib&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;string&amp;gt;&lt;/P&gt;&lt;P&gt;#include "soapH.h"&lt;/P&gt;&lt;P&gt;#include "VimBinding.nsmap"&lt;/P&gt;&lt;P&gt;#include "soapVimBindingProxy.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main() {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VimBindingProxy service;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ns2__ManagedObjectReference mor;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;service.soap_endpoint = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;ip address&amp;gt;:443/sdk";&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; // Invoke Login API&lt;BR /&gt; ns2__LoginRequestType login_request;&lt;BR /&gt; _ns2__LoginResponse&amp;nbsp;&amp;nbsp; login_response;&lt;BR /&gt; login_request._USCOREthis = &amp;amp;mor;&lt;BR /&gt; login_request.userName = "root"; &lt;BR /&gt; login_request.password = "&amp;lt;my root passwd&amp;gt;";&lt;BR /&gt; &lt;BR /&gt; if (service.Login(&amp;amp;login_request, &amp;amp;login_response) == SOAP_OK) {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "login ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; } &lt;BR /&gt; else {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "login not ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; service.soap_print_fault(stdout);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; // Invoke RetrieveServiceContent API &lt;BR /&gt; ns2__RetrieveServiceContentRequestType service_request;&lt;BR /&gt; _ns2__RetrieveServiceContentResponse service_response;&lt;BR /&gt; service_request._USCOREthis = &amp;amp;mor;&lt;BR /&gt; &lt;BR /&gt; if (service.RetrieveServiceContent(&amp;amp;service_request, &amp;amp;service_response) == SOAP_OK) {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "retrieve ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; } &lt;BR /&gt; else {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "retrieve not ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; service.soap_print_fault(stdout);&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how I compiled the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok@ashok-desktop:g++&amp;nbsp; -DWITH_OPENSSL -DWITH_COOKIES test.cpp&amp;nbsp; soapC.cpp soapVimBindingProxy.cpp&amp;nbsp; /home/ashok/gsoap-2.7/gsoap/stdsoap2.cpp -lssl -lcrypto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I get both "not ok" messages when I run the executable.&amp;nbsp;&amp;nbsp;&amp;nbsp; Looking at this code, is it obvious to you what I'm not doing&amp;nbsp; correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;You'll need your ServiceContent first.&amp;nbsp; You'll need it for most of the&amp;nbsp; method calls against the SDK and should get it first.&amp;nbsp; You also need to&amp;nbsp; do a bit more setup on the ManagedObject reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should setup the ManagedObjectReference with the "ServiceInstance"&amp;nbsp; string.&amp;nbsp; I updated it below.&amp;nbsp; Call this before the login, you'll need&amp;nbsp; the ServiceContent response for login.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;// Invoke RetrieveServiceContent API &lt;BR /&gt;ns2__RetrieveServiceContentRequestType service_request;&lt;BR /&gt;_ns2__RetrieveServiceContentResponse service_response;&lt;BR /&gt;&lt;BR /&gt;mor.__item = "ServiceInstance";&lt;BR /&gt;mor.type = new string("ServiceInstance");&lt;BR /&gt;service_request._USCOREthis = &amp;amp;mor;&lt;BR /&gt;&lt;BR /&gt;if (service.RetrieveServiceContent(&amp;amp;service_request, &amp;amp;service_response) == SOAP_OK) &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "retrieve ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;} &lt;BR /&gt;else &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "retrieve not ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; service.soap_print_fault(stdout);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;delete mor.type;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The login function is from the SessionManager object, so you'll need that to set up your Login call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;&lt;BR /&gt;ns2__ServiceContent *ServiceContent;&lt;BR /&gt;ServiceContent = service_response.returnval;&lt;BR /&gt;&lt;BR /&gt;// Invoke Login API&lt;BR /&gt;ns2__LoginRequestType login_request;&lt;BR /&gt;_ns2__LoginResponse login_response;&lt;BR /&gt;&lt;BR /&gt;login_request._USCOREthis = ServiceContent-&amp;gt;sessionManager;&lt;BR /&gt;login_request.userName = "root"; &lt;BR /&gt;login_request.password = "&amp;lt;my root passwd&amp;gt;";&lt;BR /&gt;&lt;BR /&gt;if (service.Login(&amp;amp;login_request, &amp;amp;login_response) == SOAP_OK) &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "login ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;} &lt;BR /&gt;else &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "login not ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; service.soap_print_fault(stdout);&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I finally got your test program (from your prior post) to build and run&amp;nbsp; properly.&amp;nbsp; Thanks so much for your help! In case anyone is interested,&amp;nbsp; here are the exact sequence of steps I took to get things working.&amp;nbsp; Note&amp;nbsp; that I have installed both gsoap-2.7 and the VI SDK in my home&amp;nbsp; directory /home/ashok:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Copy over the vim25 WSDL file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cp /home/ashok/vi_sdk/SDK/wsdl/vim25/vim.wsdl .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Build .h and .cpp files from WSDL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wsdl2h -o vim25.h vim.wsdl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;soapcpp2 -x -C vim25.h -I/home/ashok/gsoap-2.7/gsoap/import&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Put test program in file test.cpp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Build executable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g++ -DWITH_OPENSSL -DWITH_COOKIES test.cpp soapC.cpp soapClient.cpp /home/ashok/gsoap-2.7/gsoap/stdsoap2.cpp -lssl -lcrypto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Run executable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok@ashok-desktop:~/vi_gsoap$ ./a.out&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="https:/"&gt;https://&lt;/A&gt;&amp;lt;ip addr&amp;gt;:443/sdk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RetrieveServiceContent - OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fullName: VMware ESX Server 3.5.0 build-123630&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name: VMware ESX Server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;build: 123630&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;version: 3.5.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;apiType: HostAgent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;productLineId: esx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use the property collector to get the ManagedObjectReference&amp;nbsp; corresponding to a specific VirtualMachine.&amp;nbsp; However, I'm having trouble&amp;nbsp; getting the MOR corresponding to a snapshot of the VM.&amp;nbsp; Given the name&amp;nbsp; of a VM and the name of a snapshot within the VM, could you please tell&amp;nbsp; me the general algorithm I need to follow to get a hold of the&amp;nbsp; ManagedObjectReference for this snapshot?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;If you're getting your VM ManagedObject from RetrieveProperties, you should also just get the &lt;STRONG&gt;snapshot&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;property.&amp;nbsp; The &lt;STRONG&gt;currentSnapshot&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from this property will have a ManagedObjectReference to the snapshot.&amp;nbsp;&amp;nbsp; You can use this to the snapshot task methods or you can&amp;nbsp; RetrieveProperties again to get the snapshot info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might be able to get you some code examples in a bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Stumpr&lt;/P&gt;&lt;P&gt;Sorry to bother you with more questions.&amp;nbsp; So I have no problems using&amp;nbsp; the PropertyCollector to iterate over all the VirtualMachine objects.&amp;nbsp;&amp;nbsp; For each VM object, I can easily grab the Snapshot MORs associated with&amp;nbsp; it as well as get info about all the virtual disk files that comprise&amp;nbsp; the VM.&amp;nbsp; What I would like to do now is to use the PropertyCollector to&amp;nbsp; iterate over all the Datastore objects and for each Datastore, find out&amp;nbsp; which VirtualMachines map to the datastore.&amp;nbsp; I took your original&amp;nbsp; traversal code and modified it slightly (I changed the datacenter&amp;nbsp; traversal path and propertyspec type).&amp;nbsp; My changes are marked with ***:&lt;BR /&gt; &lt;BR /&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSelectionSpec.name = new string("FolderTraversalSpec");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSelectionSpec.name = new string("DataCenterVMTraversalSpec");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.name = new string("DataCenterVMTraversalSpec");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.type = "Datacenter";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.path = "datastoreFolder";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.name = new string("FolderTraversalSpec");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.type = "Folder";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.path = "childEntity";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.selectSet.push_back(&amp;amp;FolderTraversalSelectionSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.selectSet.push_back(&amp;amp;DataCenterVMTraversalSelectionSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.selectSet.push_back(&amp;amp;FolderTraversalSelectionSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PropertySpec.type = "Datastore";&amp;nbsp;&amp;nbsp; ***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PropertySpec.all = &amp;amp;xsd_true;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ObjectSpec.obj = ServiceContent-&amp;gt;rootFolder;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ObjectSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ObjectSpec.selectSet.push_back(&amp;amp;FolderTraversalSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ObjectSpec.selectSet.push_back(&amp;amp;DataCenterVMTraversalSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PropertyFilterSpec.propSet.push_back(&amp;amp;PropertySpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PropertyFilterSpec.objectSet.push_back(&amp;amp;ObjectSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RetrievePropertiesReq._USCOREthis = ServiceContent-&amp;gt;propertyCollector;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RetrievePropertiesReq.specSet.push_back(&amp;amp;PropertyFilterSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I invoke the RetrieveProperties function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( vim.__ns1__RetrieveProperties(&amp;amp;RetrievePropertiesReq, &amp;amp;RetrievePropertiesRes) == SOAP_OK )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the ESX server responds with a fault:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOAP 1.1 fault: "":ServerFaultCode&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no subcode"&gt;no subcode&lt;/A&gt;&lt;/P&gt;&lt;P&gt;""&lt;/P&gt;&lt;P&gt;Detail:&lt;/P&gt;&lt;P&gt;Is this something you have seen before?&lt;BR /&gt; Thanks&lt;BR /&gt; Ashok&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I don't think there is a folder for the Datastore.&amp;nbsp; You will probably&amp;nbsp; need to just do your call to get the Datacenter object(s) and then&amp;nbsp; enumerate their datastores...using the string "datastoreFolder" is&amp;nbsp; likely the cause of your serverFaultCode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;FolderTraversalSelectionSpec.name = new string("FolderTraversalSpec");&lt;BR /&gt;DataCenterVMTraversalSelectionSpec.name = new string("DataCenterVMTraversalSpec");&lt;BR /&gt;&lt;BR /&gt;DataCenterVMTraversalSpec.name = new string("DataCenterVMTraversalSpec");&lt;BR /&gt;DataCenterVMTraversalSpec.type = "Datacenter";&lt;BR /&gt;DataCenterVMTraversalSpec.path = "vmFolder"; // Change this back&lt;BR /&gt;DataCenterVMTraversalSpec.skip = &amp;amp;xsd_true;&lt;BR /&gt;&lt;BR /&gt;FolderTraversalSpec.name = new string("FolderTraversalSpec");&lt;BR /&gt;FolderTraversalSpec.type = "Folder";&lt;BR /&gt;FolderTraversalSpec.path = "childEntity";&lt;BR /&gt;FolderTraversalSpec.skip = &amp;amp;xsd_true;&lt;BR /&gt;&lt;BR /&gt;DataCenterVMTraversalSpec.selectSet.push_back(&amp;amp;FolderTraversalSelectionSpec);&lt;BR /&gt;FolderTraversalSpec.selectSet.push_back(&amp;amp;DataCenterVMTraversalSelectionSpec);&lt;BR /&gt;FolderTraversalSpec.selectSet.push_back(&amp;amp;FolderTraversalSelectionSpec);&lt;BR /&gt;&lt;BR /&gt;PropertySpec.type = "Datacenter"; // Change this to Datacenter&lt;BR /&gt;PropertySpec.all = &amp;amp;xsd_false; // Change this to false, just get the Datastore property -- will be faster&lt;BR /&gt;PropertySpec.pathSet.push_back("name"); // Get the name in case you have multiple datacenters in your inventory&lt;BR /&gt;PropertySpec.pathSet.push_back("datastore"); // Get the datastore property&lt;BR /&gt;&lt;BR /&gt;ObjectSpec.obj = ServiceContent-&amp;gt;rootFolder;&lt;BR /&gt;ObjectSpec.skip = &amp;amp;xsd_true;&lt;BR /&gt;&lt;BR /&gt;ObjectSpec.selectSet.push_back(&amp;amp;FolderTraversalSpec);&lt;BR /&gt;ObjectSpec.selectSet.push_back(&amp;amp;DataCenterVMTraversalSpec);&lt;BR /&gt;&lt;BR /&gt;PropertyFilterSpec.propSet.push_back(&amp;amp;PropertySpec);&lt;BR /&gt;PropertyFilterSpec.objectSet.push_back(&amp;amp;ObjectSpec);&lt;BR /&gt;&lt;BR /&gt;RetrievePropertiesReq._USCOREthis = ServiceContent-&amp;gt;propertyCollector;&lt;BR /&gt;RetrievePropertiesReq.specSet.push_back(&amp;amp;PropertyFilterSpec);&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read up on TraversalSpecs in the VI SDK Programming guide.&amp;nbsp; I&amp;nbsp; sort of take the lazy method of just using a sort of 'generic all'&amp;nbsp; TraversalSpec, but you'll want to review it to understand what inventory&amp;nbsp; objects you can query that way.&lt;BR /&gt; &lt;BR /&gt; What will really start to drive you crazy is when you have to deal with&amp;nbsp; the DynamicProperty data type you get back from your calls.&amp;nbsp; You'll end&amp;nbsp; up with a lot of conditional code using either dynamic_cast or typeid&amp;nbsp; calls.&amp;nbsp; I've been thinking of creating a class, say Entity, that would&amp;nbsp; parse the properties data and build a hash_map similar to how the perl&amp;nbsp; toolkit get_view* and find_entity_view* calls work.&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Thank you very much.&amp;nbsp; I'll give this a try and let you know what&amp;nbsp; happens.&amp;nbsp; What I find confusing is that when I access the MOB for my ESX&amp;nbsp; server over the web, I see that the Datacenter object type has a&amp;nbsp; property called 'datastoreFolder' and the value of this property is&amp;nbsp; 'ha-folder-datastore'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other thing: I have created 2 VMs on two different ESX servers --&amp;nbsp; one runs ESX Server 3.5 and the other runs the 4.0 Beta.&amp;nbsp; I can&amp;nbsp; successfully issue a PowerOn command to the ESX 4.0 server using the&amp;nbsp; call: vim-&amp;gt;__ns1__PowerOnVM(&amp;amp;powerOnReq, &amp;amp;powerOnRes)&amp;nbsp; (where&amp;nbsp; the powerOnReq object contains a pointer to the VM MOR corresponding to&amp;nbsp; the VM I created).&amp;nbsp; However, when I issue the same command to the ESX&amp;nbsp; 3.5 server, I get the SOAP_FAULT error that I reported previously:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOAP 1.1 fault: "":ServerFaultCode no subcode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Detail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am certain I am accessing the VM MOR properly on the ESX 3.5 server&amp;nbsp; because I can print out the correct properties of this machine.&amp;nbsp; I just&amp;nbsp; can't power it on/off, take snapshots, etc.&amp;nbsp; Do you have any idea why&amp;nbsp; the 3.5 server won't allow me to issue these commands?&amp;nbsp; Could it be some&amp;nbsp; kind of permission issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Could be, do you have full admin rights on 3.5?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Ashok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try to understand what you did with the ESX server, you call the&amp;nbsp; following line of code but supplied a MOR to your host. Am I right?&lt;/P&gt;&lt;P&gt;vim-&amp;gt;__ns1__PowerOnVM(&amp;amp;powerOnReq, &amp;amp;powerOnRes)&lt;/P&gt;&lt;P&gt;If so, you for sure got the error message. Basically the PowerOnVM is&amp;nbsp; only applicable for the virtual machine managed object. If you want to&amp;nbsp; power on a host, you want to use... Wait a second, you cannot power on a&amp;nbsp; host using VI SDK at all. But if you want to power it off, then you can&amp;nbsp; use ShutdownHost_Task() method. Check out more @ &lt;A class="jive-link-external" href="http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.HostSystem.html"&gt;http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.HostSystem.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Final note, if you use higher level API like VI Java API, you will not&amp;nbsp; get this problem at all. The compile will enforce the type checking.&amp;nbsp; Find it more at &lt;A class="jive-link-external" href="http://vijava.sf.net/"&gt;http://vijava.sf.net&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Steve JIN, VMware Engineering&lt;BR /&gt; Creator of &lt;A class="jive-link-external" href="http://vijava.sf.net/"&gt;VMware Infrastructure Java(Jython) API&lt;/A&gt;.&amp;nbsp; VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in&amp;nbsp; deserialization; only 1/4 of the size required by AXIS. More&amp;nbsp; importantly, the freedom to redistribute it with your applications. (&lt;A class="jive-link-external" href="http://sourceforge.net/project/showfiles.php?group_id=228007"&gt;Download&lt;/A&gt;, &lt;A class="jive-link-external" href="http://vijava.svn.sourceforge.net/viewvc/vijava/trunk/src/com/vmware/vim25/mo/samples/"&gt;Samples&lt;/A&gt;, &lt;A class="jive-link-external" href="http://vijava.wiki.sourceforge.net/"&gt;DocWiki&lt;/A&gt;, &lt;A class="jive-link-external" href="http://sourceforge.net/export/rss2_projnews.php?group_id=228007"&gt;RSS Feed&lt;/A&gt;)&lt;BR /&gt; &lt;A class="jive-link-external" href="http://www.linkedin.com/groups?gid=1817385"&gt;Get Connected with Other Developers in the Community?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I didn't get that impression.&amp;nbsp; He stated he had a moref from a VM he&amp;nbsp; created (and used it to populate his PowerOnReq object), then got a&amp;nbsp; fault only when trying to power on the VM on an ESX 3.5 server, his beta&amp;nbsp; 4 worked properly.&amp;nbsp; If it isn't a permission issue Ashok, post up some&amp;nbsp; code.&amp;nbsp; Might be able to see if there is anything off in the call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I wasn't sure what he did... You are right, sharing more code definitely helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve JIN, VMware Engineering&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creator of&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.sf.net/"&gt;VMware Infrastructure Java(Jython) API&lt;/A&gt;.&amp;nbsp; VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in&amp;nbsp; deserialization; only 1/4 of the size required by AXIS. More&amp;nbsp; importantly, the freedom to redistribute it with your applications. (&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://sourceforge.net/project/showfiles.php?group_id=228007"&gt;Download&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.svn.sourceforge.net/viewvc/vijava/trunk/src/com/vmware/vim25/mo/samples/"&gt;Samples&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.wiki.sourceforge.net/"&gt;DocWiki&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://sourceforge.net/export/rss2_projnews.php?group_id=228007"&gt;RSS Feed&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://www.linkedin.com/groups?gid=1817385"&gt;Get Connected with Other Developers in the Community?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Steve and stumpr:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(stumpr: what is your real name by the way?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the small test program that I've been using to power on /&amp;nbsp; power off a specified VM.&amp;nbsp; To recap, I can use this program to&amp;nbsp; manipulate a VM on an ESX 4.0 beta server, but not a VM on an ESX 3.5&amp;nbsp; server.&amp;nbsp; I am pretty certain that this has nothing to do with&amp;nbsp; permissions on the 3.5 server.&amp;nbsp; The reason for this is that I can&amp;nbsp; powerOn/powerOff a VM on the ESX 3.5 machine using the Java sample&amp;nbsp; program VMpowerOps.java, but I cannot do this with my C++ program.&amp;nbsp; In&amp;nbsp; both programs, I login using the same username ("root") and password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the command I issue to get the Java program working (note that I use the "--ignorecert" option):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok@ashok-ubuntu-vm:~/vi_sdk/SDK/samples/Axis/java$ ./run.sh com.vmware.samples.vm.VMpowerOps --url&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="https:/"&gt;https://&lt;/A&gt;&amp;lt;ip&amp;nbsp; address&amp;gt;:443/sdk/vimService --username root --password &amp;lt;my&amp;nbsp; password&amp;gt; --vmname ashok_linux_1 --operation poweroff --ignorecert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;./run.sh: 48: pushd: not found&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RUNNING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject= Sun Mar 22 00:20:26 PDT 2009 "&gt; Sun Mar 22 00:20:26 PDT 2009 &lt;/A&gt; Begin Log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Started&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Powering off virtualmachine 'ashok_linux_1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Virtual Machine ashok_linux_1 powered off successfuly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ended VMpowerOps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why would the powerOn/powerOff operation work correctly from the Java application, but not the C++ app?&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;It's sort of an issue with the gsoap code generation, but I found an answer after a comparing a few packet captures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there are actually two functions created after parsing the VMware vim25 wsdl matching PowerOnVM.&amp;nbsp; One is the&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PowerOnVM&lt;/STRONG&gt; function you used.&amp;nbsp; However, this will send the method name to the VIM instance as&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PowerOnVM&lt;/STRONG&gt; which is the VIM service returns as unsupported.&amp;nbsp; This in turn generates the fault code you were seeing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is another function,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PowerOnVM_USCORETask&lt;/STRONG&gt;.&amp;nbsp; You'll need to&amp;nbsp; use this version (and I suspect you'll need it for every _Task&amp;nbsp; function).&amp;nbsp; This will create the soap envelope with the function name as&amp;nbsp; the VIM service expects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing that Beta 4 either is supports both (or just PowerOnVM).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's actually an easy fix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update your powerVM function to match the following: (I put a "This line has changed" comment at the end of each line I changed)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;static void&lt;BR /&gt;powerVM(VimBinding* vim, ns1__ServiceContent* serviceContent,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string vm_name, bool powerOn) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; ns1__ManagedObjectReference* vm_mor = &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getVMManagedObjectRef(vim, serviceContent, vm_name);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; if (powerOn) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Power-on the Virtual Machine.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ns1__PowerOnVMRequestType powerOnReq;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _ns1__PowerOnVM_USCORETaskResponse powerOnRes; // This line is changed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; powerOnReq._USCOREthis = vm_mor;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (vim-&amp;gt;__ns1__PowerOnVM_USCORETask(&amp;amp;powerOnReq, &amp;amp;powerOnRes) == SOAP_OK) { // This line is changed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "PowerOn of VM " &amp;lt;&amp;lt; vm_name &amp;lt;&amp;lt; " successful" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "PowerOn of VM " &amp;lt;&amp;lt; vm_name &amp;lt;&amp;lt; " unsuccessful" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_print_fault(vim-&amp;gt;soap,stderr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_done(vim-&amp;gt;soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_end(vim-&amp;gt;soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Power-off the Virtual Machine.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ns1__PowerOffVMRequestType powerOffReq;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _ns1__PowerOffVM_USCORETaskResponse powerOffRes;&amp;nbsp; // This line is changed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; powerOffReq._USCOREthis = vm_mor;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (vim-&amp;gt;__ns1__PowerOffVM_USCORETask(&amp;amp;powerOffReq, &amp;amp;powerOffRes) == SOAP_OK) { // This line is changed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "PowerOff of VM " &amp;lt;&amp;lt; vm_name &amp;lt;&amp;lt; " successful" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "PowerOff of VM " &amp;lt;&amp;lt; vm_name &amp;lt;&amp;lt; " unsuccessful" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_print_fault(vim-&amp;gt;soap,stderr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_done(vim-&amp;gt;soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_end(vim-&amp;gt;soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just verified that using the PowerOnVM_USCORETask function on the ESX&amp;nbsp; 3.5 server works fine, thanks for your help!&amp;nbsp; I will let you know if I&amp;nbsp; run into any problems with the datastore object retrieval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm curious as&amp;nbsp; to why&amp;nbsp; gsoap generates both PowerOnVM and&amp;nbsp; PowerOnVM_USCORETask functions.&amp;nbsp; It seems that we should always use the&amp;nbsp; latter function.&amp;nbsp; When would one use the former?&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Well, both are defined in the WSDL.&amp;nbsp; In fact, the PowerOnVM worked for Beta 4 right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They may have it in there as a place holder or just not have gotten&amp;nbsp; around to implementing that version on the server side.&amp;nbsp; Don't know.&amp;nbsp;&amp;nbsp; Does the PowerOnVM_Task work on Beta 4 as well?&amp;nbsp; I don't have a b4&amp;nbsp; system to test against.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Stumpr is right that both methods are there in the WSDL. In the API ref,&amp;nbsp; you only see the *_Task version. Please stick with the *_Task() since&amp;nbsp; the * version may go away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve JIN, VMware Engineering&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creator of&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.sf.net/"&gt;VMware Infrastructure Java(Jython) API&lt;/A&gt;.&amp;nbsp; VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in&amp;nbsp; deserialization; only 1/4 of the size required by AXIS. More&amp;nbsp; importantly, the freedom to redistribute it with your applications. (&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://sourceforge.net/project/showfiles.php?group_id=228007"&gt;Download&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.svn.sourceforge.net/viewvc/vijava/trunk/src/com/vmware/vim25/mo/samples/"&gt;Samples&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.wiki.sourceforge.net/"&gt;DocWiki&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://sourceforge.net/export/rss2_projnews.php?group_id=228007"&gt;RSS Feed&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://www.linkedin.com/groups?gid=1817385"&gt;Get Connected with Other Developers in the Community?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have followed the same steps listed in this thread to traverse Managed&amp;nbsp; objects to get the list of VMs in my&amp;nbsp; C++ client with gsoap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Login happened successfully. But RetrieveProperties()&amp;nbsp; is returning zero objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I am using ESX server 3.5.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following message appears in /var/log/vmware/hostd.log, whenever I run my client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.542 'ha-eventmgr' 29846448 info&lt;/SPAN&gt; Event 10 : User root@127.0.0.1 logged in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.554 'App' 14834608 error&lt;/SPAN&gt; _FetchPropertyPath got unexpected error of type&amp;nbsp; N3Vim5Fault16NotAuthenticated9ExceptionE: vim.fault.NotAuthenticated,&amp;nbsp; for ref=ha-folder-root, path=childEntity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.564 'Vmomi' 3076436896 info&lt;/SPAN&gt; Activation&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=N5Vmomi10ActivationE:0xae06200"&gt;N5Vmomi10ActivationE:0xae06200&lt;/A&gt; : Invoke done&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=logout"&gt;logout&lt;/A&gt; on&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;vim.SessionManager:ha-sessionmgr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.565 'Vmomi' 3076436896 info&lt;/SPAN&gt; Throw vim.fault.NotAuthenticated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.565 'Vmomi' 3076436896 info&lt;/SPAN&gt; Result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(vim.fault.NotAuthenticated) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dynamicType = &amp;lt;unset&amp;gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;object = 'vim.SessionManager:ha-sessionmgr',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;privilegeId = "System.View",&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;msg = ""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The client code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;string&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;sstream&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;vector&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "visdkH.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "visdkStub.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "VimBinding.nsmap"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;assert.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;typeinfo&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using namespace std;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct soap *soap;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ostringstream server;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void sigpipe_handle(int x) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cout &amp;lt;&amp;lt; "sigpipe: " &amp;lt;&amp;lt; x &amp;lt;&amp;lt; endl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int getCurrentVMMob(sduvisdk2__ServiceContent *ServiceContent) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sduvisdk2__TraversalSpec DatacenterToVmFolderTraversalSpec, FolderToChildEntityTraversalSpec;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sduvisdk2__SelectionSpec DatacenterToVmFolderSelectionSpec, FolderToChildEntitySelectionSpec;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sduvisdk2__PropertySpec propertySpec;&lt;BR /&gt; sduvisdk2__ObjectSpec objectSpec;&lt;BR /&gt; sduvisdk2__PropertyFilterSpec propertyFilterSpec;&lt;BR /&gt; sduvisdk2__DynamicProperty dynamicProperty;&lt;BR /&gt; &lt;BR /&gt; sduvisdk2__RetrievePropertiesRequestType retrievePropertiesReq;&lt;BR /&gt; _sduvisdk2__RetrievePropertiesResponse retrievePropertiesRes;&lt;BR /&gt; sduvisdk2__ManagedObjectReference* vm_mor = NULL;&lt;/P&gt;&lt;P&gt;bool xsd_true = 1;&lt;BR /&gt; bool xsd_false = 0;&lt;/P&gt;&lt;P&gt;FolderToChildEntitySelectionSpec.name = new string("DatacenterToVmFolderTraversalSpec");&lt;BR /&gt; DatacenterToVmFolderSelectionSpec.name = new string("FolderToChildEntityTraversalSpec");&lt;/P&gt;&lt;P&gt;DatacenterToVmFolderTraversalSpec.name = new string("DatacenterToVmFolderTraversalSpec");&lt;BR /&gt; DatacenterToVmFolderTraversalSpec.type = "Datacenter";&lt;BR /&gt; DatacenterToVmFolderTraversalSpec.path = "vmFolder";&lt;BR /&gt; DatacenterToVmFolderTraversalSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;FolderToChildEntityTraversalSpec.name = new string("FolderToChildEntityTraversalSpec");&lt;BR /&gt; FolderToChildEntityTraversalSpec.type = "Folder";&lt;BR /&gt; FolderToChildEntityTraversalSpec.path = "childEntity";&lt;BR /&gt; FolderToChildEntityTraversalSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;DatacenterToVmFolderTraversalSpec.selectSet.push_back(&amp;amp;FolderToChildEntitySelectionSpec);&lt;BR /&gt; FolderToChildEntityTraversalSpec.selectSet.push_back(&amp;amp;DatacenterToVmFolderSelectionSpec);&lt;BR /&gt; FolderToChildEntityTraversalSpec.selectSet.push_back(&amp;amp;FolderToChildEntitySelectionSpec);&lt;/P&gt;&lt;P&gt;propertySpec.type = "VirtualMachine";&lt;BR /&gt; propertySpec.all = &amp;amp;xsd_false;&lt;BR /&gt; propertySpec.pathSet.push_back("name");&lt;/P&gt;&lt;P&gt;objectSpec.obj = ServiceContent-&amp;gt;rootFolder;&lt;BR /&gt; objectSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;objectSpec.selectSet.push_back(&amp;amp;FolderToChildEntityTraversalSpec);&lt;BR /&gt; objectSpec.selectSet.push_back(&amp;amp;DatacenterToVmFolderTraversalSpec);&lt;/P&gt;&lt;P&gt;propertyFilterSpec.propSet.push_back(&amp;amp;propertySpec);&lt;BR /&gt; propertyFilterSpec.objectSet.push_back(&amp;amp;objectSpec);&lt;/P&gt;&lt;P&gt;retrievePropertiesReq._USCOREthis = ServiceContent-&amp;gt;propertyCollector;&lt;BR /&gt; retrievePropertiesReq.specSet.push_back(&amp;amp;propertyFilterSpec);&lt;BR /&gt; &lt;BR /&gt; soap_call___sduvisdk2__RetrieveProperties(soap, server.str().c_str(), "",&lt;BR /&gt; &amp;amp;retrievePropertiesReq, &amp;amp;retrievePropertiesRes);&lt;BR /&gt; &lt;BR /&gt; if (soap-&amp;gt;error) {&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; goto end_of_function; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;cout &amp;lt;&amp;lt; "Retrieved Properties: " &amp;lt;&amp;lt; retrievePropertiesRes.returnval.size() &amp;lt;&amp;lt; "\n";&lt;/P&gt;&lt;P&gt;for (unsigned int i = 0; i &amp;lt; retrievePropertiesRes.returnval.size(); i++) {&lt;BR /&gt; dynamicProperty = *retrievePropertiesRes.returnval&lt;EM&gt;-&amp;gt;propSet[0];&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; assert(dynamicProperty.name == "name");&lt;BR /&gt; xsd__string* name = (xsd__string*) dynamicProperty.val;&lt;BR /&gt; &lt;BR /&gt; cout &amp;lt;&amp;lt; "VM name: " &amp;lt;&amp;lt; name-&amp;gt;__item &amp;lt;&amp;lt; endl;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; }&lt;BR /&gt; end_of_function:&lt;BR /&gt; delete FolderToChildEntitySelectionSpec.name;&lt;BR /&gt; delete FolderToChildEntityTraversalSpec.name;&lt;BR /&gt; delete DatacenterToVmFolderSelectionSpec.name;&lt;BR /&gt; delete DatacenterToVmFolderTraversalSpec.name;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; return soap-&amp;gt;error;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; int main(int argc, char *argv[])&lt;BR /&gt; {&lt;BR /&gt; int ret = 0;&lt;BR /&gt; sduvisdk2__RetrieveServiceContentRequestType SvcCont;&lt;BR /&gt; _sduvisdk2__RetrieveServiceContentResponse Response;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; sduvisdk2__ManagedObjectReference *Mobj;&lt;BR /&gt; sduvisdk2__ServiceContent *sc;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; sduvisdk2__LoginRequestType login;&lt;BR /&gt; _sduvisdk2__LoginResponse loginResponse;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; sduvisdk2__LogoutRequestType logout;&lt;BR /&gt; _sduvisdk2__LogoutResponse logoutResponse;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; sduvisdk2__AboutInfo *about;&amp;nbsp; &lt;BR /&gt; sduvisdk2__UserSession *returnval = NULL;&lt;BR /&gt; &lt;BR /&gt; if (argc != 4) {&lt;BR /&gt; cout &amp;lt;&amp;lt; "Usage: " &amp;lt;&amp;lt; argv[0] &amp;lt;&amp;lt; " &amp;lt;ESX-server-IP&amp;gt; &amp;lt;user&amp;gt; &amp;lt;passwd&amp;gt;\n";&lt;BR /&gt; exit(1);&lt;BR /&gt; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN&gt; server &amp;lt;&amp;lt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://"&gt;https://&lt;/A&gt;&lt;SPAN&gt;" &amp;lt;&amp;lt; argv[1] &amp;lt;&amp;lt; ":443/sdk";&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; soap = soap_new();&lt;BR /&gt; soap_init(soap);&lt;BR /&gt; soap_set_namespaces(soap, namespaces);&lt;BR /&gt; &lt;BR /&gt; Mobj = new sduvisdk2__ManagedObjectReference;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; soap_ssl_init();&lt;BR /&gt; if (soap_ssl_client_context( soap, SOAP_SSL_NO_AUTHENTICATION, NULL, NULL, NULL, NULL, NULL)) {&lt;BR /&gt; &lt;BR /&gt; std::cout &amp;lt;&amp;lt; "SSL:";&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; soap_done(soap);&lt;BR /&gt; soap_end(soap);&lt;BR /&gt; exit(1);&lt;BR /&gt; }&lt;BR /&gt; Mobj-&amp;gt;__item = "ServiceInstance";&lt;BR /&gt; Mobj-&amp;gt;type = new string("ServiceInstance");&lt;BR /&gt; SvcCont._USCOREthis = Mobj;&lt;BR /&gt; &lt;BR /&gt; ret = soap_call___sduvisdk2__RetrieveServiceContent(soap, server.str().c_str(), "", &amp;amp;SvcCont, &amp;amp;Response);&lt;BR /&gt; if(SOAP_OK == ret) {&lt;BR /&gt; cout &amp;lt;&amp;lt; "Retrieve success\n";&lt;BR /&gt; &lt;BR /&gt; } else {&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; cout &amp;lt;&amp;lt; "Soap Errors " &amp;lt;&amp;lt; soap-&amp;gt;error &lt;BR /&gt; &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; soap-&amp;gt;errnum;&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; goto end_of_function;&lt;BR /&gt; }&lt;BR /&gt; sc = Response.returnval;&lt;BR /&gt; &lt;BR /&gt; if( !sc || !sc-&amp;gt;sessionManager ) {&lt;BR /&gt; goto end_of_function;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; about = sc-&amp;gt;about;&amp;nbsp; &lt;BR /&gt; cout &amp;lt;&amp;lt; "---------------------------------------\n" &lt;BR /&gt; &amp;lt;&amp;lt; "About Info: \n"&lt;BR /&gt; &amp;lt;&amp;lt; "Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "FullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;fullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "Vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&amp;nbsp; &lt;BR /&gt; &amp;lt;&amp;lt; "osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "productLineId :" &amp;lt;&amp;lt; about-&amp;gt;productLineId &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &amp;lt;&amp;lt; "----------------------------------------\n";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; login._USCOREthis = sc-&amp;gt;sessionManager;&lt;BR /&gt; login.userName = argv[2];&lt;BR /&gt; login.password = argv[3];&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; soap_call___sduvisdk2__Login(soap, server.str().c_str(), "", &amp;amp;login, &amp;amp;loginResponse);&lt;BR /&gt; if(soap-&amp;gt;error != SOAP_OK ) {&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; goto end_of_function;&lt;BR /&gt; }&lt;BR /&gt; returnval = loginResponse.returnval;&lt;BR /&gt; &lt;BR /&gt; cout &amp;lt;&amp;lt;&amp;nbsp; "Login success, the details are:\n"&lt;BR /&gt; &amp;lt;&amp;lt;&amp;nbsp; "\tUser: "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; returnval-&amp;gt;userName &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt;&amp;nbsp; "\tFull Name: " &amp;lt;&amp;lt; returnval-&amp;gt;fullName &amp;lt;&amp;lt; endl &lt;BR /&gt; &amp;lt;&amp;lt;&amp;nbsp; "\tLocale: "&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; returnval-&amp;gt;locale &amp;lt;&amp;lt; endl;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; ret = getCurrentVMMob(sc);&lt;BR /&gt; if (ret != SOAP_OK) &lt;BR /&gt; cout &amp;lt;&amp;lt; "Failed to get CurrentVMMob\n";&amp;nbsp; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; cout &amp;lt;&amp;lt; "\nNow Logging out\n";&lt;BR /&gt; logout._USCOREthis = sc-&amp;gt;sessionManager;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; ret = soap_call___sduvisdk2__Logout(soap, server.str().c_str(), "", &amp;amp;logout, &amp;amp;logoutResponse);&lt;BR /&gt; if( soap-&amp;gt;error != SOAP_OK ) {&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; goto end_of_function;&lt;BR /&gt; }&lt;BR /&gt; cout &amp;lt;&amp;lt; "Logout succesful\n";&lt;BR /&gt; &lt;BR /&gt; end_of_function:&lt;BR /&gt; soap_done(soap);&lt;BR /&gt; soap_end(soap);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; When I run this code:&lt;BR /&gt; &lt;BR /&gt; $ ./DynamicClient 10.72.197.66 root XXXXX&lt;BR /&gt; Retrieve success&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;About Info: &lt;BR /&gt; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server&lt;BR /&gt; FullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server 3.5.0 build-64607&lt;BR /&gt; Vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware, Inc.&lt;BR /&gt; version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :3.5.0&lt;BR /&gt; build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :64607&lt;BR /&gt; osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :vmnix-x86&lt;BR /&gt; productLineId :esx&lt;BR /&gt; apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :HostAgent&lt;BR /&gt; apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; :2.5.0&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Login success, the details are:&lt;BR /&gt; User: root&lt;BR /&gt; Full Name: root&lt;BR /&gt; Locale: en&lt;BR /&gt; Retrieved Properties: 0&lt;BR /&gt; &lt;BR /&gt; Now Logging out&lt;BR /&gt; SOAP 1.1 fault: "":ServerFaultCode &lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no subcode"&gt;no subcode&lt;/A&gt;&lt;BR /&gt; "The session is not authenticated."&lt;BR /&gt; Detail: &lt;BR /&gt; &lt;BR /&gt; Why is Logout() call failing. Please let me know if I am doing anything wrong in my client code.&lt;BR /&gt; &lt;BR /&gt; Thanks!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Did you compile all your sources with -DWITH_COOKIES?&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Hi stumpr,&lt;BR /&gt; &lt;BR /&gt; Yes. I complied my sources with -DWITH_COOKIES. I am hitting this issue with/without -DWITH_COOKIES.&lt;BR /&gt; &lt;BR /&gt; Thanks!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;You &lt;STRONG&gt;have&lt;/STRONG&gt; to use WITH_COOKIES, or you will not be authenticated&amp;nbsp; on subsequent calls to the API.&amp;nbsp; Make sure you compiled all components,&amp;nbsp; not just your final executable.&amp;nbsp; I'll take another look at your code&amp;nbsp; and see if anything sticks out.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Hi stumpr,&lt;BR /&gt; &lt;BR /&gt; I tried to generate the stubs once again and compiled the sources with -DWITH_COOKIES. Logout is working fine now. &lt;BR /&gt; I see proper messages in /var/log/vmware/hostd.log&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="text-decoration: line-through;"&gt;2009-05-14 02:21:45.673 'ha-eventmgr' 3076436896 info&lt;/SPAN&gt; Event 45 : User root@127.0.0.1 logged in&lt;BR /&gt; &lt;SPAN style="text-decoration: line-through;"&gt;2009-05-14 02:21:45.697 'ha-eventmgr' 14834608 info&lt;/SPAN&gt; Event 46 : User root logged out&lt;BR /&gt; &lt;BR /&gt; When I run the client (attached with this post), no Object Contents are&amp;nbsp; found. Is there anything wrong in my client code (traversing the Mobs)&lt;BR /&gt; &lt;BR /&gt; bash-2.05b$ ./a.out 10.72.197.66 root XXXXX&lt;BR /&gt; Retrieve success&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;About Info: &lt;BR /&gt; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server&lt;BR /&gt; FullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server 3.5.0 build-64607&lt;BR /&gt; Vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware, Inc.&lt;BR /&gt; version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :3.5.0&lt;BR /&gt; build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :64607&lt;BR /&gt; osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :vmnix-x86&lt;BR /&gt; productLineId :esx&lt;BR /&gt; apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :HostAgent&lt;BR /&gt; apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; :2.5.0&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Login success, the details are:&lt;BR /&gt; User: root&lt;BR /&gt; Full Name: root&lt;BR /&gt; Locale: en&lt;BR /&gt; Retrieved Properties: 0&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;nbsp; No VMs found&lt;BR /&gt; &lt;BR /&gt; Now Logging out&lt;BR /&gt; Logout succesful&lt;BR /&gt; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Thanks once again!!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Hi stumpr,&lt;BR /&gt; &lt;BR /&gt; I made an error in following statements:&lt;BR /&gt; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;DIV class="jive-quote"&gt;&lt;DIV class="jive-quote"&gt;&lt;EM&gt;FolderToChildEntitySelectionSpec.name = new string("DatacenterToVmFolderTraversalSpec");&lt;BR /&gt; DatacenterToVmFolderSelectionSpec.name = new string("FolderToChildEntityTraversalSpec");&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; The client code works fine after correcting them to,&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;DIV class="jive-quote"&gt;&lt;DIV class="jive-quote"&gt;&lt;EM&gt;FolderToChildEntitySelectionSpec.name = new string("FolderToChildEntityTraversalSpec");&lt;BR /&gt; DatacenterToVmFolderSelectionSpec.name = new string("DatacenterToVmFolderTraversalSpec");&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; Sorry for troubling you guys.&lt;BR /&gt; &lt;BR /&gt; bash-2.05b$ ./a.out 10.72.197.66 root brooklyn&lt;BR /&gt; Retrieve success&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;About Info: &lt;BR /&gt; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server&lt;BR /&gt; FullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server 3.5.0 build-64607&lt;BR /&gt; Vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware, Inc.&lt;BR /&gt; version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :3.5.0&lt;BR /&gt; build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :64607&lt;BR /&gt; osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :vmnix-x86&lt;BR /&gt; productLineId :esx&lt;BR /&gt; apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :HostAgent&lt;BR /&gt; apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; :2.5.0&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Login success, the details are:&lt;BR /&gt; User: root&lt;BR /&gt; Full Name: root&lt;BR /&gt; Locale: en&lt;BR /&gt; Retrieved Properties: 5&lt;BR /&gt; VM name: rhel5&lt;BR /&gt; VM name: Solaris_VM&lt;BR /&gt; VM name: Pattar_rhel4&lt;BR /&gt; VM name: winxp&lt;BR /&gt; VM name: winserver2k8&lt;BR /&gt; &lt;BR /&gt; Now Logging out&lt;BR /&gt; Logout succesful&lt;BR /&gt; bash-2.05b$ &lt;BR /&gt; &lt;BR /&gt; Thanks a lot!!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;I followed the same steps as listed in&amp;nbsp; this post but I am unable to get past the "vim.fault.NotAuthenticated,&amp;nbsp; for ref=ha-folder-root" error. I am working with ESX 4.0 and have no&amp;nbsp; issues accessing it via SDK using the Java samples. For my project I&amp;nbsp; need to build an application in C++ to manage the ESX hosts. I am able&amp;nbsp; to retrieve the ServiceContent and login to the host however my attempts&amp;nbsp; to retrieve the Virtual Machines on the host is failing with following&amp;nbsp; error on the host (hostd-0.log file):&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="text-decoration: line-through;"&gt;2009-06-2309:12:00.812 F6430B90 info 'ha-eventmgr'&lt;/SPAN&gt; Event 123 : User root@127.0.0.1logged in&lt;BR /&gt; --2009-06-23 09:12:00.817 F6430B90 error 'App'-- _FetchPropertyPath got&amp;nbsp; unexpected error of type N3Vim5Fault16NotAuthenticated9ExceptionE:&amp;nbsp; vim.fault.NotAuthenticated, for ref=ha-folder-root, path=childEntity&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; All the&amp;nbsp; application components are built with -DWITH_OPENSSL and -DWITH_COOKIES&amp;nbsp; flags. I have attached the source file (retrieveVMs.cpp) for this&amp;nbsp; program.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; Am I doing something wrong in the client code or is this some&amp;nbsp; permissions issue I need to fix on the host? I have another C++ sample&amp;nbsp; program based on the SimpleClient.java sample form SDK and that results&amp;nbsp; in same error. &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; Thanks!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Probably is from permissions. I tested your code (with some modifications) and it seems is working. Look here &lt;A class="jive-link-external" href="http://www.randombugs.com/linux/vmware-webservice-gsoap.html"&gt;http://www.randombugs.com/linux/vmware-webservice-gsoap.html&lt;/A&gt; to see a version of your code adapted for VImBinding add with some extra features.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; The issue I posted related to authenction was related to cookies. I was&amp;nbsp; building against libgsoapssl++ when I saw this issue. Building with the&amp;nbsp; gsoap source (stdsoap2.cpp) and -DWITH_COOKIES flag resolved the issue.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Your post in randombugs is a good starting point for someone working with VMWare Webservices SDK.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Thanks!&lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Anyone make any progress on the gsoap with ssl certificate validation&amp;nbsp; on ESX 4.0?&amp;nbsp; I haven't dug in too deep but was playing with it a bit on&amp;nbsp; Friday as time permitted.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Did you see that: &lt;A class="jive-link-external" href="http://www.cs.fsu.edu/%7Eengelen/soapdoc2.html#tth_sEc13.1"&gt;http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc13.1&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;EM&gt;&lt;EM&gt;soap_init(&amp;amp;soap);&lt;/EM&gt; &lt;BR clear="all" /&gt; soap_ssl_server_context(&amp;amp;soap,&amp;nbsp; SOAP_SSL_DEFAULT,&amp;nbsp; "server.pem",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp; keyfile: required when server must authenticate to clients (see SSL docs&amp;nbsp; on how to obtain this file) &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "password",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* password to read the key file &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "cacert.pem",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* optional cacert file to store trusted certificates &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* optional capath to directory with trusted certificates &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "dh512.pem",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* DH file, if NULL use RSA &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* if randfile!=NULL: use a file with random data to seed randomness &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* optional server identification to enable SSL session cache (must be a unique name) */ &lt;BR clear="all" /&gt; ))&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;I've seen it.&amp;nbsp; Have you run your code against ESX 4.0 servers?&amp;nbsp; If so, post up your gsoap, openssl and OS version please.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Ok, I think I found the issue with the certificates.&lt;BR /&gt; &lt;BR /&gt; The program used to generate the certs (/sbin/generate-certificates) is&amp;nbsp; deleting what I believe is the intermediate certificate.&amp;nbsp; You can see&amp;nbsp; the error when you run &lt;STRONG&gt;openssl verify /etc/vmware/ssl/rui.crt&lt;/STRONG&gt;.&amp;nbsp; However, I commented out the rm commands at the end &lt;STRONG&gt;/sbin/generate-certificates&lt;/STRONG&gt; script and then combined the files &lt;STRONG&gt;/etc/vmware/ssl/ca.crt&lt;/STRONG&gt; and &lt;STRONG&gt;/etc/vmware/ssl/rui.crt&lt;/STRONG&gt; into a new file (after deleting my old rui.crt and rui.key files).&amp;nbsp; This is then cleanly verified with &lt;STRONG&gt;openssl verify /etc/vmware/ssl/combined.crt&lt;/STRONG&gt;.&amp;nbsp;&amp;nbsp; This certificate will work with VMware ESX 4.0 and gSoap.&amp;nbsp; This is&amp;nbsp; likely to come up with other applications that do not allow you to trust&amp;nbsp; a certificate with an intermediate trust or strictly checks for an&amp;nbsp; intermediary.&lt;BR /&gt; &lt;BR /&gt; I'd chalk this one upto a bug personally.&amp;nbsp; The ca.crt and rui.crt should&amp;nbsp; be concatenated into a single file before cleaning up.&amp;nbsp; This probably&amp;nbsp; won't affect anyone not doing server certificate validation and/or&amp;nbsp; clients that use keychains in the OS (which will probably let you&amp;nbsp; implicitly trust the certificate even without its intermediary).&lt;BR /&gt; &lt;BR /&gt; I just couldn't let this one go, even though I'm not using gsoap as much lately.&lt;BR /&gt; &lt;BR /&gt; This document was generated from the following thread: &lt;A _jive_internal="true" href="https://communities.vmware.com/thread/200348"&gt;Problems connecting to VI SDK using C++/gsoap-2.7&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jul 2009 19:09:45 GMT</pubDate>
    <dc:creator>dmitrif</dc:creator>
    <dc:date>2009-07-03T19:09:45Z</dc:date>
    <item>
      <title>Problems connecting to VI SDK using C++/gsoap-2.7</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/ta-p/2788120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I know this topic has been discussed quite a lot recently, but&amp;nbsp; unfortunately I haven't been able to find a solution to my problem.&amp;nbsp; I&amp;nbsp; am currently running ESX Server 3.5.&amp;nbsp; I have no problems accessing it&amp;nbsp; via the SDK using Java and Perl.&amp;nbsp; However, I am trying to get a simple&amp;nbsp; C++ program working that can connect to it and do something useful.&amp;nbsp;&amp;nbsp; First of all, I changed the proxy.xml file on the ESX Server so that the&amp;nbsp; sdk can be accessed via both http and https.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, on my client machine (64-bit AMD Athlon running Ubuntu 8.10) I&amp;nbsp; have installed gsoap-2.7 to convert the WSDL files into stubs necessary&amp;nbsp; to communicate with the server.&amp;nbsp; I use the various gsoap programs to&amp;nbsp; convert the vimService.wsdl file in the directory SDK/wsdl/vim/ as&amp;nbsp; follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wsdl2h -x -s vimService.wsdl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;soapcpp2 -i -C -I/home/ashok/gsoap-2.7/gsoap/import vimService.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This generates soapH.h, soapStub.h, soapC.cpp, as well as soapVimBindingProxy.{h,cpp}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my simple test.cpp driver program that tries to access the ESX&amp;nbsp; Server and create a snapshot of one of the VMs (note that I've specified&amp;nbsp; http and not https in the URL):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;#include "soapH.h"&lt;/P&gt;&lt;P&gt;#include "VimBinding.nsmap"&lt;/P&gt;&lt;P&gt;#include "soapVimBindingProxy.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main() {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VimBindingProxy service;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;service.soap_endpoint = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server ip address&amp;gt;:443/sdk";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ns2__ManagedObjectReference mor;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ns2__CreateSnapshotRequestType req;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_ns2__CreateSnapshotResponse resp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;req._USCOREthis = &amp;amp;mor;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;req.name = "ashok_linux_1";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;req.memory = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;req.quiesce = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (service.CreateSnapshot(&amp;amp;req, &amp;amp;resp) == SOAP_OK) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; "OK"&amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; "BAD" &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;service.soap_print_fault(stdout);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I compile this and run as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g++ *.cpp -Wall -DWITH_OPENSSL -lgsoap++&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok@ashok-desktop: ./a.out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error -1 fault: SOAP-ENV:Client&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no subcode"&gt;no subcode&lt;/A&gt;&lt;/P&gt;&lt;P&gt;"End of file or no input: Connection reset by peer"&lt;/P&gt;&lt;P&gt;Detail: &lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no detail"&gt;no detail&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message "Error -1 fault: SOAP-ENV:Client&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no subcode"&gt;no subcode&lt;/A&gt;"&amp;nbsp; is something that I always&amp;nbsp; get, regardless of the SDK function that I&amp;nbsp; invoke.&amp;nbsp; Has anyone figured out this problem, specifically using the C++&amp;nbsp; stub functions auto-generated by gsoap?&amp;nbsp; If so, please tell me what I'm&amp;nbsp; doing wrong as I'm close to pulling my hair out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I think I'm going to write up a tutorial for C++ &amp;amp; gsoap to get&amp;nbsp; people started.&amp;nbsp; I got a working setup that will build libraries and use&amp;nbsp; the advanced C++ proxy option.&amp;nbsp; This generates more OO like code that&amp;nbsp; (in my opinion) reads and is easier to code with.&amp;nbsp; I'll post it up in&amp;nbsp; this thread if I do get to it this week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First thing is you'll need to login first.&amp;nbsp; You won't be able to call most of the functions in the SDK until you do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll also need to keep the compile flags consistent for all the&amp;nbsp; objects.&amp;nbsp; You'll need at least -DWITH_COOKIES.&amp;nbsp; Without cookies you'll&amp;nbsp; end up with permission errors as you end up regenerating a new SessionID&amp;nbsp; for each call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you also post up all the steps in your compile process?&amp;nbsp; It wasn't clear if you compiled and linked in your soapC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a very simple example you can work from.&amp;nbsp; I don't call a login in&amp;nbsp; this one, but you can use it to get a working program and start to&amp;nbsp; build on it.&amp;nbsp; It does use SSL so you can see how that's handled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;#include "soapVimBindingProxy.h"&lt;BR /&gt;#include "VimBinding.nsmap"&lt;BR /&gt;#include &amp;lt;time.h&amp;gt;&lt;BR /&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#include &amp;lt;typeinfo&amp;gt;&lt;BR /&gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;&lt;BR /&gt;void sigpipe_handle(int x) { cout &amp;lt;&amp;lt; "sigpipe: " &amp;lt;&amp;lt; x &amp;lt;&amp;lt; endl; }&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char* argv[])&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VimBinding vim;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ns1__ManagedObjectReference ManagedObjectRef;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ns1__RetrieveServiceContentRequestType RetrieveServiceContentReq;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_ns1__RetrieveServiceContentResponse RetrieveServiceContentRes;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ns1__ServiceContent *ServiceContent;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ns1__AboutInfo *AboutInfo;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (argc != 2)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "Usage: " &amp;lt;&amp;lt; argv[0] &amp;lt;&amp;lt; " &amp;lt;service url&amp;gt;" &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string service_url(argv[1]);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vim.endpoint = service_url.c_str();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_ssl_init();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (soap_ssl_client_context(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vim.soap,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SOAP_SSL_NO_AUTHENTICATION,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "SSL:";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_print_fault(vim.soap, stderr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_done(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_end(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ManagedObjectRef.__item = "ServiceInstance";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ManagedObjectRef.type = new string("ServiceInstance");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RetrieveServiceContentReq._USCOREthis = &amp;amp;ManagedObjectRef;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ( vim.__ns1__RetrieveServiceContent(&amp;amp;RetrieveServiceContentReq, &amp;amp;RetrieveServiceContentRes) == SOAP_OK )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "RetrieveServiceContent - OK" &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;delete ManagedObjectRef.type;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_print_fault(vim.soap,stderr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_done(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_end(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ServiceContent = RetrieveServiceContentRes.returnval;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (ServiceContent &amp;amp;&amp;amp; ServiceContent-&amp;gt;about)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AboutInfo = ServiceContent-&amp;gt;about;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "fullName: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;fullName &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; name: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;name &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; build: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;build &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; version: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;version &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; apiType: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;apiType &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cout &amp;lt;&amp;lt; "&amp;nbsp; productLineId: " &amp;lt;&amp;lt; AboutInfo-&amp;gt;productLineId &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;delete ManagedObjectRef.type;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_done(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;soap_end(vim.soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Thank you very much for your response.&amp;nbsp; I am looking forward to reading&amp;nbsp; your C++/gsoap "Getting Started" tutorial.&amp;nbsp;&amp;nbsp; I will try working with the&amp;nbsp; template code you provided, but I first tried adding login capability&amp;nbsp; to my original test program.&amp;nbsp; My program (test.cpp) now looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;#include &amp;lt;cstdlib&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;string&amp;gt;&lt;/P&gt;&lt;P&gt;#include "soapH.h"&lt;/P&gt;&lt;P&gt;#include "VimBinding.nsmap"&lt;/P&gt;&lt;P&gt;#include "soapVimBindingProxy.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main() {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VimBindingProxy service;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ns2__ManagedObjectReference mor;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;service.soap_endpoint = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;ip address&amp;gt;:443/sdk";&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; // Invoke Login API&lt;BR /&gt; ns2__LoginRequestType login_request;&lt;BR /&gt; _ns2__LoginResponse&amp;nbsp;&amp;nbsp; login_response;&lt;BR /&gt; login_request._USCOREthis = &amp;amp;mor;&lt;BR /&gt; login_request.userName = "root"; &lt;BR /&gt; login_request.password = "&amp;lt;my root passwd&amp;gt;";&lt;BR /&gt; &lt;BR /&gt; if (service.Login(&amp;amp;login_request, &amp;amp;login_response) == SOAP_OK) {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "login ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; } &lt;BR /&gt; else {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "login not ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; service.soap_print_fault(stdout);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; // Invoke RetrieveServiceContent API &lt;BR /&gt; ns2__RetrieveServiceContentRequestType service_request;&lt;BR /&gt; _ns2__RetrieveServiceContentResponse service_response;&lt;BR /&gt; service_request._USCOREthis = &amp;amp;mor;&lt;BR /&gt; &lt;BR /&gt; if (service.RetrieveServiceContent(&amp;amp;service_request, &amp;amp;service_response) == SOAP_OK) {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "retrieve ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; } &lt;BR /&gt; else {&lt;BR /&gt; std::cout &amp;lt;&amp;lt; "retrieve not ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt; service.soap_print_fault(stdout);&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how I compiled the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok@ashok-desktop:g++&amp;nbsp; -DWITH_OPENSSL -DWITH_COOKIES test.cpp&amp;nbsp; soapC.cpp soapVimBindingProxy.cpp&amp;nbsp; /home/ashok/gsoap-2.7/gsoap/stdsoap2.cpp -lssl -lcrypto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I get both "not ok" messages when I run the executable.&amp;nbsp;&amp;nbsp;&amp;nbsp; Looking at this code, is it obvious to you what I'm not doing&amp;nbsp; correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;You'll need your ServiceContent first.&amp;nbsp; You'll need it for most of the&amp;nbsp; method calls against the SDK and should get it first.&amp;nbsp; You also need to&amp;nbsp; do a bit more setup on the ManagedObject reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should setup the ManagedObjectReference with the "ServiceInstance"&amp;nbsp; string.&amp;nbsp; I updated it below.&amp;nbsp; Call this before the login, you'll need&amp;nbsp; the ServiceContent response for login.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;// Invoke RetrieveServiceContent API &lt;BR /&gt;ns2__RetrieveServiceContentRequestType service_request;&lt;BR /&gt;_ns2__RetrieveServiceContentResponse service_response;&lt;BR /&gt;&lt;BR /&gt;mor.__item = "ServiceInstance";&lt;BR /&gt;mor.type = new string("ServiceInstance");&lt;BR /&gt;service_request._USCOREthis = &amp;amp;mor;&lt;BR /&gt;&lt;BR /&gt;if (service.RetrieveServiceContent(&amp;amp;service_request, &amp;amp;service_response) == SOAP_OK) &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "retrieve ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;} &lt;BR /&gt;else &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "retrieve not ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; service.soap_print_fault(stdout);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;delete mor.type;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The login function is from the SessionManager object, so you'll need that to set up your Login call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;&lt;BR /&gt;ns2__ServiceContent *ServiceContent;&lt;BR /&gt;ServiceContent = service_response.returnval;&lt;BR /&gt;&lt;BR /&gt;// Invoke Login API&lt;BR /&gt;ns2__LoginRequestType login_request;&lt;BR /&gt;_ns2__LoginResponse login_response;&lt;BR /&gt;&lt;BR /&gt;login_request._USCOREthis = ServiceContent-&amp;gt;sessionManager;&lt;BR /&gt;login_request.userName = "root"; &lt;BR /&gt;login_request.password = "&amp;lt;my root passwd&amp;gt;";&lt;BR /&gt;&lt;BR /&gt;if (service.Login(&amp;amp;login_request, &amp;amp;login_response) == SOAP_OK) &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "login ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;} &lt;BR /&gt;else &lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "login not ok" &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; service.soap_print_fault(stdout);&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I finally got your test program (from your prior post) to build and run&amp;nbsp; properly.&amp;nbsp; Thanks so much for your help! In case anyone is interested,&amp;nbsp; here are the exact sequence of steps I took to get things working.&amp;nbsp; Note&amp;nbsp; that I have installed both gsoap-2.7 and the VI SDK in my home&amp;nbsp; directory /home/ashok:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Copy over the vim25 WSDL file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cp /home/ashok/vi_sdk/SDK/wsdl/vim25/vim.wsdl .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Build .h and .cpp files from WSDL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wsdl2h -o vim25.h vim.wsdl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;soapcpp2 -x -C vim25.h -I/home/ashok/gsoap-2.7/gsoap/import&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Put test program in file test.cpp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Build executable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g++ -DWITH_OPENSSL -DWITH_COOKIES test.cpp soapC.cpp soapClient.cpp /home/ashok/gsoap-2.7/gsoap/stdsoap2.cpp -lssl -lcrypto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Run executable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok@ashok-desktop:~/vi_gsoap$ ./a.out&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="https:/"&gt;https://&lt;/A&gt;&amp;lt;ip addr&amp;gt;:443/sdk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RetrieveServiceContent - OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fullName: VMware ESX Server 3.5.0 build-123630&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name: VMware ESX Server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;build: 123630&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;version: 3.5.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;apiType: HostAgent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;productLineId: esx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use the property collector to get the ManagedObjectReference&amp;nbsp; corresponding to a specific VirtualMachine.&amp;nbsp; However, I'm having trouble&amp;nbsp; getting the MOR corresponding to a snapshot of the VM.&amp;nbsp; Given the name&amp;nbsp; of a VM and the name of a snapshot within the VM, could you please tell&amp;nbsp; me the general algorithm I need to follow to get a hold of the&amp;nbsp; ManagedObjectReference for this snapshot?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;If you're getting your VM ManagedObject from RetrieveProperties, you should also just get the &lt;STRONG&gt;snapshot&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;property.&amp;nbsp; The &lt;STRONG&gt;currentSnapshot&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from this property will have a ManagedObjectReference to the snapshot.&amp;nbsp;&amp;nbsp; You can use this to the snapshot task methods or you can&amp;nbsp; RetrieveProperties again to get the snapshot info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might be able to get you some code examples in a bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Stumpr&lt;/P&gt;&lt;P&gt;Sorry to bother you with more questions.&amp;nbsp; So I have no problems using&amp;nbsp; the PropertyCollector to iterate over all the VirtualMachine objects.&amp;nbsp;&amp;nbsp; For each VM object, I can easily grab the Snapshot MORs associated with&amp;nbsp; it as well as get info about all the virtual disk files that comprise&amp;nbsp; the VM.&amp;nbsp; What I would like to do now is to use the PropertyCollector to&amp;nbsp; iterate over all the Datastore objects and for each Datastore, find out&amp;nbsp; which VirtualMachines map to the datastore.&amp;nbsp; I took your original&amp;nbsp; traversal code and modified it slightly (I changed the datacenter&amp;nbsp; traversal path and propertyspec type).&amp;nbsp; My changes are marked with ***:&lt;BR /&gt; &lt;BR /&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSelectionSpec.name = new string("FolderTraversalSpec");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSelectionSpec.name = new string("DataCenterVMTraversalSpec");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.name = new string("DataCenterVMTraversalSpec");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.type = "Datacenter";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.path = "datastoreFolder";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.name = new string("FolderTraversalSpec");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.type = "Folder";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.path = "childEntity";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataCenterVMTraversalSpec.selectSet.push_back(&amp;amp;FolderTraversalSelectionSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.selectSet.push_back(&amp;amp;DataCenterVMTraversalSelectionSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FolderTraversalSpec.selectSet.push_back(&amp;amp;FolderTraversalSelectionSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PropertySpec.type = "Datastore";&amp;nbsp;&amp;nbsp; ***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PropertySpec.all = &amp;amp;xsd_true;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ObjectSpec.obj = ServiceContent-&amp;gt;rootFolder;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ObjectSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ObjectSpec.selectSet.push_back(&amp;amp;FolderTraversalSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ObjectSpec.selectSet.push_back(&amp;amp;DataCenterVMTraversalSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PropertyFilterSpec.propSet.push_back(&amp;amp;PropertySpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PropertyFilterSpec.objectSet.push_back(&amp;amp;ObjectSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RetrievePropertiesReq._USCOREthis = ServiceContent-&amp;gt;propertyCollector;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RetrievePropertiesReq.specSet.push_back(&amp;amp;PropertyFilterSpec);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I invoke the RetrieveProperties function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( vim.__ns1__RetrieveProperties(&amp;amp;RetrievePropertiesReq, &amp;amp;RetrievePropertiesRes) == SOAP_OK )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the ESX server responds with a fault:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOAP 1.1 fault: "":ServerFaultCode&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no subcode"&gt;no subcode&lt;/A&gt;&lt;/P&gt;&lt;P&gt;""&lt;/P&gt;&lt;P&gt;Detail:&lt;/P&gt;&lt;P&gt;Is this something you have seen before?&lt;BR /&gt; Thanks&lt;BR /&gt; Ashok&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I don't think there is a folder for the Datastore.&amp;nbsp; You will probably&amp;nbsp; need to just do your call to get the Datacenter object(s) and then&amp;nbsp; enumerate their datastores...using the string "datastoreFolder" is&amp;nbsp; likely the cause of your serverFaultCode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;FolderTraversalSelectionSpec.name = new string("FolderTraversalSpec");&lt;BR /&gt;DataCenterVMTraversalSelectionSpec.name = new string("DataCenterVMTraversalSpec");&lt;BR /&gt;&lt;BR /&gt;DataCenterVMTraversalSpec.name = new string("DataCenterVMTraversalSpec");&lt;BR /&gt;DataCenterVMTraversalSpec.type = "Datacenter";&lt;BR /&gt;DataCenterVMTraversalSpec.path = "vmFolder"; // Change this back&lt;BR /&gt;DataCenterVMTraversalSpec.skip = &amp;amp;xsd_true;&lt;BR /&gt;&lt;BR /&gt;FolderTraversalSpec.name = new string("FolderTraversalSpec");&lt;BR /&gt;FolderTraversalSpec.type = "Folder";&lt;BR /&gt;FolderTraversalSpec.path = "childEntity";&lt;BR /&gt;FolderTraversalSpec.skip = &amp;amp;xsd_true;&lt;BR /&gt;&lt;BR /&gt;DataCenterVMTraversalSpec.selectSet.push_back(&amp;amp;FolderTraversalSelectionSpec);&lt;BR /&gt;FolderTraversalSpec.selectSet.push_back(&amp;amp;DataCenterVMTraversalSelectionSpec);&lt;BR /&gt;FolderTraversalSpec.selectSet.push_back(&amp;amp;FolderTraversalSelectionSpec);&lt;BR /&gt;&lt;BR /&gt;PropertySpec.type = "Datacenter"; // Change this to Datacenter&lt;BR /&gt;PropertySpec.all = &amp;amp;xsd_false; // Change this to false, just get the Datastore property -- will be faster&lt;BR /&gt;PropertySpec.pathSet.push_back("name"); // Get the name in case you have multiple datacenters in your inventory&lt;BR /&gt;PropertySpec.pathSet.push_back("datastore"); // Get the datastore property&lt;BR /&gt;&lt;BR /&gt;ObjectSpec.obj = ServiceContent-&amp;gt;rootFolder;&lt;BR /&gt;ObjectSpec.skip = &amp;amp;xsd_true;&lt;BR /&gt;&lt;BR /&gt;ObjectSpec.selectSet.push_back(&amp;amp;FolderTraversalSpec);&lt;BR /&gt;ObjectSpec.selectSet.push_back(&amp;amp;DataCenterVMTraversalSpec);&lt;BR /&gt;&lt;BR /&gt;PropertyFilterSpec.propSet.push_back(&amp;amp;PropertySpec);&lt;BR /&gt;PropertyFilterSpec.objectSet.push_back(&amp;amp;ObjectSpec);&lt;BR /&gt;&lt;BR /&gt;RetrievePropertiesReq._USCOREthis = ServiceContent-&amp;gt;propertyCollector;&lt;BR /&gt;RetrievePropertiesReq.specSet.push_back(&amp;amp;PropertyFilterSpec);&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read up on TraversalSpecs in the VI SDK Programming guide.&amp;nbsp; I&amp;nbsp; sort of take the lazy method of just using a sort of 'generic all'&amp;nbsp; TraversalSpec, but you'll want to review it to understand what inventory&amp;nbsp; objects you can query that way.&lt;BR /&gt; &lt;BR /&gt; What will really start to drive you crazy is when you have to deal with&amp;nbsp; the DynamicProperty data type you get back from your calls.&amp;nbsp; You'll end&amp;nbsp; up with a lot of conditional code using either dynamic_cast or typeid&amp;nbsp; calls.&amp;nbsp; I've been thinking of creating a class, say Entity, that would&amp;nbsp; parse the properties data and build a hash_map similar to how the perl&amp;nbsp; toolkit get_view* and find_entity_view* calls work.&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Thank you very much.&amp;nbsp; I'll give this a try and let you know what&amp;nbsp; happens.&amp;nbsp; What I find confusing is that when I access the MOB for my ESX&amp;nbsp; server over the web, I see that the Datacenter object type has a&amp;nbsp; property called 'datastoreFolder' and the value of this property is&amp;nbsp; 'ha-folder-datastore'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other thing: I have created 2 VMs on two different ESX servers --&amp;nbsp; one runs ESX Server 3.5 and the other runs the 4.0 Beta.&amp;nbsp; I can&amp;nbsp; successfully issue a PowerOn command to the ESX 4.0 server using the&amp;nbsp; call: vim-&amp;gt;__ns1__PowerOnVM(&amp;amp;powerOnReq, &amp;amp;powerOnRes)&amp;nbsp; (where&amp;nbsp; the powerOnReq object contains a pointer to the VM MOR corresponding to&amp;nbsp; the VM I created).&amp;nbsp; However, when I issue the same command to the ESX&amp;nbsp; 3.5 server, I get the SOAP_FAULT error that I reported previously:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOAP 1.1 fault: "":ServerFaultCode no subcode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Detail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am certain I am accessing the VM MOR properly on the ESX 3.5 server&amp;nbsp; because I can print out the correct properties of this machine.&amp;nbsp; I just&amp;nbsp; can't power it on/off, take snapshots, etc.&amp;nbsp; Do you have any idea why&amp;nbsp; the 3.5 server won't allow me to issue these commands?&amp;nbsp; Could it be some&amp;nbsp; kind of permission issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Could be, do you have full admin rights on 3.5?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Ashok,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try to understand what you did with the ESX server, you call the&amp;nbsp; following line of code but supplied a MOR to your host. Am I right?&lt;/P&gt;&lt;P&gt;vim-&amp;gt;__ns1__PowerOnVM(&amp;amp;powerOnReq, &amp;amp;powerOnRes)&lt;/P&gt;&lt;P&gt;If so, you for sure got the error message. Basically the PowerOnVM is&amp;nbsp; only applicable for the virtual machine managed object. If you want to&amp;nbsp; power on a host, you want to use... Wait a second, you cannot power on a&amp;nbsp; host using VI SDK at all. But if you want to power it off, then you can&amp;nbsp; use ShutdownHost_Task() method. Check out more @ &lt;A class="jive-link-external" href="http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.HostSystem.html"&gt;http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.HostSystem.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Final note, if you use higher level API like VI Java API, you will not&amp;nbsp; get this problem at all. The compile will enforce the type checking.&amp;nbsp; Find it more at &lt;A class="jive-link-external" href="http://vijava.sf.net/"&gt;http://vijava.sf.net&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Steve JIN, VMware Engineering&lt;BR /&gt; Creator of &lt;A class="jive-link-external" href="http://vijava.sf.net/"&gt;VMware Infrastructure Java(Jython) API&lt;/A&gt;.&amp;nbsp; VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in&amp;nbsp; deserialization; only 1/4 of the size required by AXIS. More&amp;nbsp; importantly, the freedom to redistribute it with your applications. (&lt;A class="jive-link-external" href="http://sourceforge.net/project/showfiles.php?group_id=228007"&gt;Download&lt;/A&gt;, &lt;A class="jive-link-external" href="http://vijava.svn.sourceforge.net/viewvc/vijava/trunk/src/com/vmware/vim25/mo/samples/"&gt;Samples&lt;/A&gt;, &lt;A class="jive-link-external" href="http://vijava.wiki.sourceforge.net/"&gt;DocWiki&lt;/A&gt;, &lt;A class="jive-link-external" href="http://sourceforge.net/export/rss2_projnews.php?group_id=228007"&gt;RSS Feed&lt;/A&gt;)&lt;BR /&gt; &lt;A class="jive-link-external" href="http://www.linkedin.com/groups?gid=1817385"&gt;Get Connected with Other Developers in the Community?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I didn't get that impression.&amp;nbsp; He stated he had a moref from a VM he&amp;nbsp; created (and used it to populate his PowerOnReq object), then got a&amp;nbsp; fault only when trying to power on the VM on an ESX 3.5 server, his beta&amp;nbsp; 4 worked properly.&amp;nbsp; If it isn't a permission issue Ashok, post up some&amp;nbsp; code.&amp;nbsp; Might be able to see if there is anything off in the call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;I wasn't sure what he did... You are right, sharing more code definitely helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve JIN, VMware Engineering&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creator of&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.sf.net/"&gt;VMware Infrastructure Java(Jython) API&lt;/A&gt;.&amp;nbsp; VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in&amp;nbsp; deserialization; only 1/4 of the size required by AXIS. More&amp;nbsp; importantly, the freedom to redistribute it with your applications. (&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://sourceforge.net/project/showfiles.php?group_id=228007"&gt;Download&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.svn.sourceforge.net/viewvc/vijava/trunk/src/com/vmware/vim25/mo/samples/"&gt;Samples&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.wiki.sourceforge.net/"&gt;DocWiki&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://sourceforge.net/export/rss2_projnews.php?group_id=228007"&gt;RSS Feed&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://www.linkedin.com/groups?gid=1817385"&gt;Get Connected with Other Developers in the Community?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Steve and stumpr:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(stumpr: what is your real name by the way?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attaching the small test program that I've been using to power on /&amp;nbsp; power off a specified VM.&amp;nbsp; To recap, I can use this program to&amp;nbsp; manipulate a VM on an ESX 4.0 beta server, but not a VM on an ESX 3.5&amp;nbsp; server.&amp;nbsp; I am pretty certain that this has nothing to do with&amp;nbsp; permissions on the 3.5 server.&amp;nbsp; The reason for this is that I can&amp;nbsp; powerOn/powerOff a VM on the ESX 3.5 machine using the Java sample&amp;nbsp; program VMpowerOps.java, but I cannot do this with my C++ program.&amp;nbsp; In&amp;nbsp; both programs, I login using the same username ("root") and password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the command I issue to get the Java program working (note that I use the "--ignorecert" option):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ashok@ashok-ubuntu-vm:~/vi_sdk/SDK/samples/Axis/java$ ./run.sh com.vmware.samples.vm.VMpowerOps --url&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="https:/"&gt;https://&lt;/A&gt;&amp;lt;ip&amp;nbsp; address&amp;gt;:443/sdk/vimService --username root --password &amp;lt;my&amp;nbsp; password&amp;gt; --vmname ashok_linux_1 --operation poweroff --ignorecert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;./run.sh: 48: pushd: not found&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RUNNING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject= Sun Mar 22 00:20:26 PDT 2009 "&gt; Sun Mar 22 00:20:26 PDT 2009 &lt;/A&gt; Begin Log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Started&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Powering off virtualmachine 'ashok_linux_1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Virtual Machine ashok_linux_1 powered off successfuly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ended VMpowerOps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why would the powerOn/powerOff operation work correctly from the Java application, but not the C++ app?&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;It's sort of an issue with the gsoap code generation, but I found an answer after a comparing a few packet captures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there are actually two functions created after parsing the VMware vim25 wsdl matching PowerOnVM.&amp;nbsp; One is the&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PowerOnVM&lt;/STRONG&gt; function you used.&amp;nbsp; However, this will send the method name to the VIM instance as&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PowerOnVM&lt;/STRONG&gt; which is the VIM service returns as unsupported.&amp;nbsp; This in turn generates the fault code you were seeing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is another function,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PowerOnVM_USCORETask&lt;/STRONG&gt;.&amp;nbsp; You'll need to&amp;nbsp; use this version (and I suspect you'll need it for every _Task&amp;nbsp; function).&amp;nbsp; This will create the soap envelope with the function name as&amp;nbsp; the VIM service expects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing that Beta 4 either is supports both (or just PowerOnVM).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's actually an easy fix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update your powerVM function to match the following: (I put a "This line has changed" comment at the end of each line I changed)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;CODE class="jive-code jive-plain"&gt;static void&lt;BR /&gt;powerVM(VimBinding* vim, ns1__ServiceContent* serviceContent,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string vm_name, bool powerOn) {&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; ns1__ManagedObjectReference* vm_mor = &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; getVMManagedObjectRef(vim, serviceContent, vm_name);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; if (powerOn) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Power-on the Virtual Machine.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ns1__PowerOnVMRequestType powerOnReq;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _ns1__PowerOnVM_USCORETaskResponse powerOnRes; // This line is changed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; powerOnReq._USCOREthis = vm_mor;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (vim-&amp;gt;__ns1__PowerOnVM_USCORETask(&amp;amp;powerOnReq, &amp;amp;powerOnRes) == SOAP_OK) { // This line is changed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "PowerOn of VM " &amp;lt;&amp;lt; vm_name &amp;lt;&amp;lt; " successful" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "PowerOn of VM " &amp;lt;&amp;lt; vm_name &amp;lt;&amp;lt; " unsuccessful" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_print_fault(vim-&amp;gt;soap,stderr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_done(vim-&amp;gt;soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_end(vim-&amp;gt;soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Power-off the Virtual Machine.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ns1__PowerOffVMRequestType powerOffReq;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _ns1__PowerOffVM_USCORETaskResponse powerOffRes;&amp;nbsp; // This line is changed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; powerOffReq._USCOREthis = vm_mor;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (vim-&amp;gt;__ns1__PowerOffVM_USCORETask(&amp;amp;powerOffReq, &amp;amp;powerOffRes) == SOAP_OK) { // This line is changed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "PowerOff of VM " &amp;lt;&amp;lt; vm_name &amp;lt;&amp;lt; " successful" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "PowerOff of VM " &amp;lt;&amp;lt; vm_name &amp;lt;&amp;lt; " unsuccessful" &amp;lt;&amp;lt; endl &amp;lt;&amp;lt; endl;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_print_fault(vim-&amp;gt;soap,stderr);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_done(vim-&amp;gt;soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; soap_end(vim-&amp;gt;soap);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just verified that using the PowerOnVM_USCORETask function on the ESX&amp;nbsp; 3.5 server works fine, thanks for your help!&amp;nbsp; I will let you know if I&amp;nbsp; run into any problems with the datastore object retrieval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm curious as&amp;nbsp; to why&amp;nbsp; gsoap generates both PowerOnVM and&amp;nbsp; PowerOnVM_USCORETask functions.&amp;nbsp; It seems that we should always use the&amp;nbsp; latter function.&amp;nbsp; When would one use the former?&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Well, both are defined in the WSDL.&amp;nbsp; In fact, the PowerOnVM worked for Beta 4 right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They may have it in there as a place holder or just not have gotten&amp;nbsp; around to implementing that version on the server side.&amp;nbsp; Don't know.&amp;nbsp;&amp;nbsp; Does the PowerOnVM_Task work on Beta 4 as well?&amp;nbsp; I don't have a b4&amp;nbsp; system to test against.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Stumpr is right that both methods are there in the WSDL. In the API ref,&amp;nbsp; you only see the *_Task version. Please stick with the *_Task() since&amp;nbsp; the * version may go away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve JIN, VMware Engineering&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creator of&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.sf.net/"&gt;VMware Infrastructure Java(Jython) API&lt;/A&gt;.&amp;nbsp; VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in&amp;nbsp; deserialization; only 1/4 of the size required by AXIS. More&amp;nbsp; importantly, the freedom to redistribute it with your applications. (&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://sourceforge.net/project/showfiles.php?group_id=228007"&gt;Download&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.svn.sourceforge.net/viewvc/vijava/trunk/src/com/vmware/vim25/mo/samples/"&gt;Samples&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://vijava.wiki.sourceforge.net/"&gt;DocWiki&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://sourceforge.net/export/rss2_projnews.php?group_id=228007"&gt;RSS Feed&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external" href="http://www.linkedin.com/groups?gid=1817385"&gt;Get Connected with Other Developers in the Community?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have followed the same steps listed in this thread to traverse Managed&amp;nbsp; objects to get the list of VMs in my&amp;nbsp; C++ client with gsoap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Login happened successfully. But RetrieveProperties()&amp;nbsp; is returning zero objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I am using ESX server 3.5.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following message appears in /var/log/vmware/hostd.log, whenever I run my client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.542 'ha-eventmgr' 29846448 info&lt;/SPAN&gt; Event 10 : User root@127.0.0.1 logged in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.554 'App' 14834608 error&lt;/SPAN&gt; _FetchPropertyPath got unexpected error of type&amp;nbsp; N3Vim5Fault16NotAuthenticated9ExceptionE: vim.fault.NotAuthenticated,&amp;nbsp; for ref=ha-folder-root, path=childEntity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.564 'Vmomi' 3076436896 info&lt;/SPAN&gt; Activation&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=N5Vmomi10ActivationE:0xae06200"&gt;N5Vmomi10ActivationE:0xae06200&lt;/A&gt; : Invoke done&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=logout"&gt;logout&lt;/A&gt; on&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;vim.SessionManager:ha-sessionmgr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.565 'Vmomi' 3076436896 info&lt;/SPAN&gt; Throw vim.fault.NotAuthenticated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;2009-05-13 04:24:49.565 'Vmomi' 3076436896 info&lt;/SPAN&gt; Result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(vim.fault.NotAuthenticated) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dynamicType = &amp;lt;unset&amp;gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;object = 'vim.SessionManager:ha-sessionmgr',&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;privilegeId = "System.View",&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;msg = ""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The client code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;string&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;iostream&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;sstream&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;vector&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "visdkH.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "visdkStub.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "VimBinding.nsmap"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;assert.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;typeinfo&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using namespace std;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct soap *soap;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ostringstream server;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void sigpipe_handle(int x) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cout &amp;lt;&amp;lt; "sigpipe: " &amp;lt;&amp;lt; x &amp;lt;&amp;lt; endl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int getCurrentVMMob(sduvisdk2__ServiceContent *ServiceContent) {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sduvisdk2__TraversalSpec DatacenterToVmFolderTraversalSpec, FolderToChildEntityTraversalSpec;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sduvisdk2__SelectionSpec DatacenterToVmFolderSelectionSpec, FolderToChildEntitySelectionSpec;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sduvisdk2__PropertySpec propertySpec;&lt;BR /&gt; sduvisdk2__ObjectSpec objectSpec;&lt;BR /&gt; sduvisdk2__PropertyFilterSpec propertyFilterSpec;&lt;BR /&gt; sduvisdk2__DynamicProperty dynamicProperty;&lt;BR /&gt; &lt;BR /&gt; sduvisdk2__RetrievePropertiesRequestType retrievePropertiesReq;&lt;BR /&gt; _sduvisdk2__RetrievePropertiesResponse retrievePropertiesRes;&lt;BR /&gt; sduvisdk2__ManagedObjectReference* vm_mor = NULL;&lt;/P&gt;&lt;P&gt;bool xsd_true = 1;&lt;BR /&gt; bool xsd_false = 0;&lt;/P&gt;&lt;P&gt;FolderToChildEntitySelectionSpec.name = new string("DatacenterToVmFolderTraversalSpec");&lt;BR /&gt; DatacenterToVmFolderSelectionSpec.name = new string("FolderToChildEntityTraversalSpec");&lt;/P&gt;&lt;P&gt;DatacenterToVmFolderTraversalSpec.name = new string("DatacenterToVmFolderTraversalSpec");&lt;BR /&gt; DatacenterToVmFolderTraversalSpec.type = "Datacenter";&lt;BR /&gt; DatacenterToVmFolderTraversalSpec.path = "vmFolder";&lt;BR /&gt; DatacenterToVmFolderTraversalSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;FolderToChildEntityTraversalSpec.name = new string("FolderToChildEntityTraversalSpec");&lt;BR /&gt; FolderToChildEntityTraversalSpec.type = "Folder";&lt;BR /&gt; FolderToChildEntityTraversalSpec.path = "childEntity";&lt;BR /&gt; FolderToChildEntityTraversalSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;DatacenterToVmFolderTraversalSpec.selectSet.push_back(&amp;amp;FolderToChildEntitySelectionSpec);&lt;BR /&gt; FolderToChildEntityTraversalSpec.selectSet.push_back(&amp;amp;DatacenterToVmFolderSelectionSpec);&lt;BR /&gt; FolderToChildEntityTraversalSpec.selectSet.push_back(&amp;amp;FolderToChildEntitySelectionSpec);&lt;/P&gt;&lt;P&gt;propertySpec.type = "VirtualMachine";&lt;BR /&gt; propertySpec.all = &amp;amp;xsd_false;&lt;BR /&gt; propertySpec.pathSet.push_back("name");&lt;/P&gt;&lt;P&gt;objectSpec.obj = ServiceContent-&amp;gt;rootFolder;&lt;BR /&gt; objectSpec.skip = &amp;amp;xsd_true;&lt;/P&gt;&lt;P&gt;objectSpec.selectSet.push_back(&amp;amp;FolderToChildEntityTraversalSpec);&lt;BR /&gt; objectSpec.selectSet.push_back(&amp;amp;DatacenterToVmFolderTraversalSpec);&lt;/P&gt;&lt;P&gt;propertyFilterSpec.propSet.push_back(&amp;amp;propertySpec);&lt;BR /&gt; propertyFilterSpec.objectSet.push_back(&amp;amp;objectSpec);&lt;/P&gt;&lt;P&gt;retrievePropertiesReq._USCOREthis = ServiceContent-&amp;gt;propertyCollector;&lt;BR /&gt; retrievePropertiesReq.specSet.push_back(&amp;amp;propertyFilterSpec);&lt;BR /&gt; &lt;BR /&gt; soap_call___sduvisdk2__RetrieveProperties(soap, server.str().c_str(), "",&lt;BR /&gt; &amp;amp;retrievePropertiesReq, &amp;amp;retrievePropertiesRes);&lt;BR /&gt; &lt;BR /&gt; if (soap-&amp;gt;error) {&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; goto end_of_function; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;cout &amp;lt;&amp;lt; "Retrieved Properties: " &amp;lt;&amp;lt; retrievePropertiesRes.returnval.size() &amp;lt;&amp;lt; "\n";&lt;/P&gt;&lt;P&gt;for (unsigned int i = 0; i &amp;lt; retrievePropertiesRes.returnval.size(); i++) {&lt;BR /&gt; dynamicProperty = *retrievePropertiesRes.returnval&lt;EM&gt;-&amp;gt;propSet[0];&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; assert(dynamicProperty.name == "name");&lt;BR /&gt; xsd__string* name = (xsd__string*) dynamicProperty.val;&lt;BR /&gt; &lt;BR /&gt; cout &amp;lt;&amp;lt; "VM name: " &amp;lt;&amp;lt; name-&amp;gt;__item &amp;lt;&amp;lt; endl;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; }&lt;BR /&gt; end_of_function:&lt;BR /&gt; delete FolderToChildEntitySelectionSpec.name;&lt;BR /&gt; delete FolderToChildEntityTraversalSpec.name;&lt;BR /&gt; delete DatacenterToVmFolderSelectionSpec.name;&lt;BR /&gt; delete DatacenterToVmFolderTraversalSpec.name;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; return soap-&amp;gt;error;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; int main(int argc, char *argv[])&lt;BR /&gt; {&lt;BR /&gt; int ret = 0;&lt;BR /&gt; sduvisdk2__RetrieveServiceContentRequestType SvcCont;&lt;BR /&gt; _sduvisdk2__RetrieveServiceContentResponse Response;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; sduvisdk2__ManagedObjectReference *Mobj;&lt;BR /&gt; sduvisdk2__ServiceContent *sc;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; sduvisdk2__LoginRequestType login;&lt;BR /&gt; _sduvisdk2__LoginResponse loginResponse;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; sduvisdk2__LogoutRequestType logout;&lt;BR /&gt; _sduvisdk2__LogoutResponse logoutResponse;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; sduvisdk2__AboutInfo *about;&amp;nbsp; &lt;BR /&gt; sduvisdk2__UserSession *returnval = NULL;&lt;BR /&gt; &lt;BR /&gt; if (argc != 4) {&lt;BR /&gt; cout &amp;lt;&amp;lt; "Usage: " &amp;lt;&amp;lt; argv[0] &amp;lt;&amp;lt; " &amp;lt;ESX-server-IP&amp;gt; &amp;lt;user&amp;gt; &amp;lt;passwd&amp;gt;\n";&lt;BR /&gt; exit(1);&lt;BR /&gt; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;SPAN&gt; server &amp;lt;&amp;lt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://"&gt;https://&lt;/A&gt;&lt;SPAN&gt;" &amp;lt;&amp;lt; argv[1] &amp;lt;&amp;lt; ":443/sdk";&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt; soap = soap_new();&lt;BR /&gt; soap_init(soap);&lt;BR /&gt; soap_set_namespaces(soap, namespaces);&lt;BR /&gt; &lt;BR /&gt; Mobj = new sduvisdk2__ManagedObjectReference;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; soap_ssl_init();&lt;BR /&gt; if (soap_ssl_client_context( soap, SOAP_SSL_NO_AUTHENTICATION, NULL, NULL, NULL, NULL, NULL)) {&lt;BR /&gt; &lt;BR /&gt; std::cout &amp;lt;&amp;lt; "SSL:";&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; soap_done(soap);&lt;BR /&gt; soap_end(soap);&lt;BR /&gt; exit(1);&lt;BR /&gt; }&lt;BR /&gt; Mobj-&amp;gt;__item = "ServiceInstance";&lt;BR /&gt; Mobj-&amp;gt;type = new string("ServiceInstance");&lt;BR /&gt; SvcCont._USCOREthis = Mobj;&lt;BR /&gt; &lt;BR /&gt; ret = soap_call___sduvisdk2__RetrieveServiceContent(soap, server.str().c_str(), "", &amp;amp;SvcCont, &amp;amp;Response);&lt;BR /&gt; if(SOAP_OK == ret) {&lt;BR /&gt; cout &amp;lt;&amp;lt; "Retrieve success\n";&lt;BR /&gt; &lt;BR /&gt; } else {&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; cout &amp;lt;&amp;lt; "Soap Errors " &amp;lt;&amp;lt; soap-&amp;gt;error &lt;BR /&gt; &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; soap-&amp;gt;errnum;&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; goto end_of_function;&lt;BR /&gt; }&lt;BR /&gt; sc = Response.returnval;&lt;BR /&gt; &lt;BR /&gt; if( !sc || !sc-&amp;gt;sessionManager ) {&lt;BR /&gt; goto end_of_function;&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; about = sc-&amp;gt;about;&amp;nbsp; &lt;BR /&gt; cout &amp;lt;&amp;lt; "---------------------------------------\n" &lt;BR /&gt; &amp;lt;&amp;lt; "About Info: \n"&lt;BR /&gt; &amp;lt;&amp;lt; "Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "FullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;fullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "Vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&amp;nbsp; &lt;BR /&gt; &amp;lt;&amp;lt; "osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "productLineId :" &amp;lt;&amp;lt; about-&amp;gt;productLineId &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt; "apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; :" &amp;lt;&amp;lt; about-&amp;gt;apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; endl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &amp;lt;&amp;lt; "----------------------------------------\n";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; login._USCOREthis = sc-&amp;gt;sessionManager;&lt;BR /&gt; login.userName = argv[2];&lt;BR /&gt; login.password = argv[3];&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; soap_call___sduvisdk2__Login(soap, server.str().c_str(), "", &amp;amp;login, &amp;amp;loginResponse);&lt;BR /&gt; if(soap-&amp;gt;error != SOAP_OK ) {&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; goto end_of_function;&lt;BR /&gt; }&lt;BR /&gt; returnval = loginResponse.returnval;&lt;BR /&gt; &lt;BR /&gt; cout &amp;lt;&amp;lt;&amp;nbsp; "Login success, the details are:\n"&lt;BR /&gt; &amp;lt;&amp;lt;&amp;nbsp; "\tUser: "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; returnval-&amp;gt;userName &amp;lt;&amp;lt; endl&lt;BR /&gt; &amp;lt;&amp;lt;&amp;nbsp; "\tFull Name: " &amp;lt;&amp;lt; returnval-&amp;gt;fullName &amp;lt;&amp;lt; endl &lt;BR /&gt; &amp;lt;&amp;lt;&amp;nbsp; "\tLocale: "&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt; returnval-&amp;gt;locale &amp;lt;&amp;lt; endl;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; ret = getCurrentVMMob(sc);&lt;BR /&gt; if (ret != SOAP_OK) &lt;BR /&gt; cout &amp;lt;&amp;lt; "Failed to get CurrentVMMob\n";&amp;nbsp; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; cout &amp;lt;&amp;lt; "\nNow Logging out\n";&lt;BR /&gt; logout._USCOREthis = sc-&amp;gt;sessionManager;&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; ret = soap_call___sduvisdk2__Logout(soap, server.str().c_str(), "", &amp;amp;logout, &amp;amp;logoutResponse);&lt;BR /&gt; if( soap-&amp;gt;error != SOAP_OK ) {&lt;BR /&gt; soap_print_fault(soap, stderr);&lt;BR /&gt; goto end_of_function;&lt;BR /&gt; }&lt;BR /&gt; cout &amp;lt;&amp;lt; "Logout succesful\n";&lt;BR /&gt; &lt;BR /&gt; end_of_function:&lt;BR /&gt; soap_done(soap);&lt;BR /&gt; soap_end(soap);&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; When I run this code:&lt;BR /&gt; &lt;BR /&gt; $ ./DynamicClient 10.72.197.66 root XXXXX&lt;BR /&gt; Retrieve success&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;About Info: &lt;BR /&gt; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server&lt;BR /&gt; FullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server 3.5.0 build-64607&lt;BR /&gt; Vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware, Inc.&lt;BR /&gt; version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :3.5.0&lt;BR /&gt; build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :64607&lt;BR /&gt; osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :vmnix-x86&lt;BR /&gt; productLineId :esx&lt;BR /&gt; apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :HostAgent&lt;BR /&gt; apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; :2.5.0&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Login success, the details are:&lt;BR /&gt; User: root&lt;BR /&gt; Full Name: root&lt;BR /&gt; Locale: en&lt;BR /&gt; Retrieved Properties: 0&lt;BR /&gt; &lt;BR /&gt; Now Logging out&lt;BR /&gt; SOAP 1.1 fault: "":ServerFaultCode &lt;A _jive_internal="true" href="https://communities.vmware.com/community-document-picker.jspa?communityID=2416&amp;amp;subject=no subcode"&gt;no subcode&lt;/A&gt;&lt;BR /&gt; "The session is not authenticated."&lt;BR /&gt; Detail: &lt;BR /&gt; &lt;BR /&gt; Why is Logout() call failing. Please let me know if I am doing anything wrong in my client code.&lt;BR /&gt; &lt;BR /&gt; Thanks!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Did you compile all your sources with -DWITH_COOKIES?&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Hi stumpr,&lt;BR /&gt; &lt;BR /&gt; Yes. I complied my sources with -DWITH_COOKIES. I am hitting this issue with/without -DWITH_COOKIES.&lt;BR /&gt; &lt;BR /&gt; Thanks!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;You &lt;STRONG&gt;have&lt;/STRONG&gt; to use WITH_COOKIES, or you will not be authenticated&amp;nbsp; on subsequent calls to the API.&amp;nbsp; Make sure you compiled all components,&amp;nbsp; not just your final executable.&amp;nbsp; I'll take another look at your code&amp;nbsp; and see if anything sticks out.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Hi stumpr,&lt;BR /&gt; &lt;BR /&gt; I tried to generate the stubs once again and compiled the sources with -DWITH_COOKIES. Logout is working fine now. &lt;BR /&gt; I see proper messages in /var/log/vmware/hostd.log&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="text-decoration: line-through;"&gt;2009-05-14 02:21:45.673 'ha-eventmgr' 3076436896 info&lt;/SPAN&gt; Event 45 : User root@127.0.0.1 logged in&lt;BR /&gt; &lt;SPAN style="text-decoration: line-through;"&gt;2009-05-14 02:21:45.697 'ha-eventmgr' 14834608 info&lt;/SPAN&gt; Event 46 : User root logged out&lt;BR /&gt; &lt;BR /&gt; When I run the client (attached with this post), no Object Contents are&amp;nbsp; found. Is there anything wrong in my client code (traversing the Mobs)&lt;BR /&gt; &lt;BR /&gt; bash-2.05b$ ./a.out 10.72.197.66 root XXXXX&lt;BR /&gt; Retrieve success&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;About Info: &lt;BR /&gt; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server&lt;BR /&gt; FullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server 3.5.0 build-64607&lt;BR /&gt; Vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware, Inc.&lt;BR /&gt; version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :3.5.0&lt;BR /&gt; build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :64607&lt;BR /&gt; osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :vmnix-x86&lt;BR /&gt; productLineId :esx&lt;BR /&gt; apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :HostAgent&lt;BR /&gt; apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; :2.5.0&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Login success, the details are:&lt;BR /&gt; User: root&lt;BR /&gt; Full Name: root&lt;BR /&gt; Locale: en&lt;BR /&gt; Retrieved Properties: 0&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;nbsp; No VMs found&lt;BR /&gt; &lt;BR /&gt; Now Logging out&lt;BR /&gt; Logout succesful&lt;BR /&gt; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Thanks once again!!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Hi stumpr,&lt;BR /&gt; &lt;BR /&gt; I made an error in following statements:&lt;BR /&gt; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;DIV class="jive-quote"&gt;&lt;DIV class="jive-quote"&gt;&lt;EM&gt;FolderToChildEntitySelectionSpec.name = new string("DatacenterToVmFolderTraversalSpec");&lt;BR /&gt; DatacenterToVmFolderSelectionSpec.name = new string("FolderToChildEntityTraversalSpec");&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; The client code works fine after correcting them to,&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;DIV class="jive-quote"&gt;&lt;DIV class="jive-quote"&gt;&lt;EM&gt;FolderToChildEntitySelectionSpec.name = new string("FolderToChildEntityTraversalSpec");&lt;BR /&gt; DatacenterToVmFolderSelectionSpec.name = new string("DatacenterToVmFolderTraversalSpec");&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; Sorry for troubling you guys.&lt;BR /&gt; &lt;BR /&gt; bash-2.05b$ ./a.out 10.72.197.66 root brooklyn&lt;BR /&gt; Retrieve success&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;About Info: &lt;BR /&gt; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server&lt;BR /&gt; FullName&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware ESX Server 3.5.0 build-64607&lt;BR /&gt; Vendor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :VMware, Inc.&lt;BR /&gt; version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :3.5.0&lt;BR /&gt; build&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :64607&lt;BR /&gt; osType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :vmnix-x86&lt;BR /&gt; productLineId :esx&lt;BR /&gt; apiType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :HostAgent&lt;BR /&gt; apiVersion&amp;nbsp;&amp;nbsp;&amp;nbsp; :2.5.0&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Login success, the details are:&lt;BR /&gt; User: root&lt;BR /&gt; Full Name: root&lt;BR /&gt; Locale: en&lt;BR /&gt; Retrieved Properties: 5&lt;BR /&gt; VM name: rhel5&lt;BR /&gt; VM name: Solaris_VM&lt;BR /&gt; VM name: Pattar_rhel4&lt;BR /&gt; VM name: winxp&lt;BR /&gt; VM name: winserver2k8&lt;BR /&gt; &lt;BR /&gt; Now Logging out&lt;BR /&gt; Logout succesful&lt;BR /&gt; bash-2.05b$ &lt;BR /&gt; &lt;BR /&gt; Thanks a lot!!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;I followed the same steps as listed in&amp;nbsp; this post but I am unable to get past the "vim.fault.NotAuthenticated,&amp;nbsp; for ref=ha-folder-root" error. I am working with ESX 4.0 and have no&amp;nbsp; issues accessing it via SDK using the Java samples. For my project I&amp;nbsp; need to build an application in C++ to manage the ESX hosts. I am able&amp;nbsp; to retrieve the ServiceContent and login to the host however my attempts&amp;nbsp; to retrieve the Virtual Machines on the host is failing with following&amp;nbsp; error on the host (hostd-0.log file):&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;SPAN style="text-decoration: line-through;"&gt;2009-06-2309:12:00.812 F6430B90 info 'ha-eventmgr'&lt;/SPAN&gt; Event 123 : User root@127.0.0.1logged in&lt;BR /&gt; --2009-06-23 09:12:00.817 F6430B90 error 'App'-- _FetchPropertyPath got&amp;nbsp; unexpected error of type N3Vim5Fault16NotAuthenticated9ExceptionE:&amp;nbsp; vim.fault.NotAuthenticated, for ref=ha-folder-root, path=childEntity&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; All the&amp;nbsp; application components are built with -DWITH_OPENSSL and -DWITH_COOKIES&amp;nbsp; flags. I have attached the source file (retrieveVMs.cpp) for this&amp;nbsp; program.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; Am I doing something wrong in the client code or is this some&amp;nbsp; permissions issue I need to fix on the host? I have another C++ sample&amp;nbsp; program based on the SimpleClient.java sample form SDK and that results&amp;nbsp; in same error. &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; Thanks!&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Probably is from permissions. I tested your code (with some modifications) and it seems is working. Look here &lt;A class="jive-link-external" href="http://www.randombugs.com/linux/vmware-webservice-gsoap.html"&gt;http://www.randombugs.com/linux/vmware-webservice-gsoap.html&lt;/A&gt; to see a version of your code adapted for VImBinding add with some extra features.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt; The issue I posted related to authenction was related to cookies. I was&amp;nbsp; building against libgsoapssl++ when I saw this issue. Building with the&amp;nbsp; gsoap source (stdsoap2.cpp) and -DWITH_COOKIES flag resolved the issue.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Your post in randombugs is a good starting point for someone working with VMWare Webservices SDK.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Thanks!&lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Anyone make any progress on the gsoap with ssl certificate validation&amp;nbsp; on ESX 4.0?&amp;nbsp; I haven't dug in too deep but was playing with it a bit on&amp;nbsp; Friday as time permitted.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Did you see that: &lt;A class="jive-link-external" href="http://www.cs.fsu.edu/%7Eengelen/soapdoc2.html#tth_sEc13.1"&gt;http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc13.1&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;EM&gt;&lt;EM&gt;soap_init(&amp;amp;soap);&lt;/EM&gt; &lt;BR clear="all" /&gt; soap_ssl_server_context(&amp;amp;soap,&amp;nbsp; SOAP_SSL_DEFAULT,&amp;nbsp; "server.pem",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/*&amp;nbsp; keyfile: required when server must authenticate to clients (see SSL docs&amp;nbsp; on how to obtain this file) &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "password",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* password to read the key file &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "cacert.pem",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* optional cacert file to store trusted certificates &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* optional capath to directory with trusted certificates &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "dh512.pem",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* DH file, if NULL use RSA &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* if randfile!=NULL: use a file with random data to seed randomness &lt;STRONG&gt;/&lt;/STRONG&gt; &lt;BR clear="all" /&gt; *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* optional server identification to enable SSL session cache (must be a unique name) */ &lt;BR clear="all" /&gt; ))&lt;/EM&gt;&lt;/BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;I've seen it.&amp;nbsp; Have you run your code against ESX 4.0 servers?&amp;nbsp; If so, post up your gsoap, openssl and OS version please.&lt;BR /&gt; &lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;EM&gt;Ok, I think I found the issue with the certificates.&lt;BR /&gt; &lt;BR /&gt; The program used to generate the certs (/sbin/generate-certificates) is&amp;nbsp; deleting what I believe is the intermediate certificate.&amp;nbsp; You can see&amp;nbsp; the error when you run &lt;STRONG&gt;openssl verify /etc/vmware/ssl/rui.crt&lt;/STRONG&gt;.&amp;nbsp; However, I commented out the rm commands at the end &lt;STRONG&gt;/sbin/generate-certificates&lt;/STRONG&gt; script and then combined the files &lt;STRONG&gt;/etc/vmware/ssl/ca.crt&lt;/STRONG&gt; and &lt;STRONG&gt;/etc/vmware/ssl/rui.crt&lt;/STRONG&gt; into a new file (after deleting my old rui.crt and rui.key files).&amp;nbsp; This is then cleanly verified with &lt;STRONG&gt;openssl verify /etc/vmware/ssl/combined.crt&lt;/STRONG&gt;.&amp;nbsp;&amp;nbsp; This certificate will work with VMware ESX 4.0 and gSoap.&amp;nbsp; This is&amp;nbsp; likely to come up with other applications that do not allow you to trust&amp;nbsp; a certificate with an intermediate trust or strictly checks for an&amp;nbsp; intermediary.&lt;BR /&gt; &lt;BR /&gt; I'd chalk this one upto a bug personally.&amp;nbsp; The ca.crt and rui.crt should&amp;nbsp; be concatenated into a single file before cleaning up.&amp;nbsp; This probably&amp;nbsp; won't affect anyone not doing server certificate validation and/or&amp;nbsp; clients that use keychains in the OS (which will probably let you&amp;nbsp; implicitly trust the certificate even without its intermediary).&lt;BR /&gt; &lt;BR /&gt; I just couldn't let this one go, even though I'm not using gsoap as much lately.&lt;BR /&gt; &lt;BR /&gt; This document was generated from the following thread: &lt;A _jive_internal="true" href="https://communities.vmware.com/thread/200348"&gt;Problems connecting to VI SDK using C++/gsoap-2.7&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 19:09:45 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/ta-p/2788120</guid>
      <dc:creator>dmitrif</dc:creator>
      <dc:date>2009-07-03T19:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problems connecting to VI SDK using C++/gsoap-2.7</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788121#M40</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having issues.. If I follow the above procedure using the sample I see these errors&lt;/P&gt;&lt;P&gt;soap-test2.cpp:10: error: VimBindingProxy was not declared in this scope&lt;/P&gt;&lt;P&gt;soap-test2.cpp:10: error: expected ; before service&lt;/P&gt;&lt;P&gt;soap-test2.cpp:11: error: ns2__ManagedObjectReference was not declared in this scope&lt;/P&gt;&lt;P&gt;soap-test2.cpp:11: error: expected ; before mor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And several others...&lt;/P&gt;&lt;P&gt;here's the start of the code&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------" /&gt;&lt;P&gt;#include &lt;/P&gt;&lt;P&gt;#include "soapH.h"&lt;/P&gt;&lt;P&gt;#include "VimBinding.nsmap"&lt;/P&gt;&lt;P&gt;#include "soapVimBindingProxy.h"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main() {&lt;/P&gt;&lt;P&gt;    VimBindingProxy service;&lt;/P&gt;&lt;P&gt;    ns2__ManagedObjectReference mor;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 19:09:37 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788121#M40</guid>
      <dc:creator>TimNixonNJ</dc:creator>
      <dc:date>2010-04-29T19:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems connecting to VI SDK using C++/gsoap-2.7</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788122#M41</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you sort it out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dmitri Fedorov&lt;/P&gt;&lt;P&gt;BridgeWays, a division of Xandros&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.vmware.com/www.bridgeways.ca" target="test_blank"&gt;www.bridgeways.ca&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 20:07:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788122#M41</guid>
      <dc:creator>dmitrif</dc:creator>
      <dc:date>2010-05-06T20:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems connecting to VI SDK using C++/gsoap-2.7</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788123#M42</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no, but I found another example that worked fine... so I guess I'm ignoring that example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 20:47:45 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788123#M42</guid>
      <dc:creator>TimNixonNJ</dc:creator>
      <dc:date>2010-05-06T20:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problems connecting to VI SDK using C++/gsoap-2.7</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788124#M43</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to create an alarm on the powerState of the VM using the gSOAP C++ generated interfaces. while running the code, I get the soap fault:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV id="_mcePaste"&gt;&lt;STRONG&gt;SOAP 1.1 fault: "":ServerFaultCode[no subcode]&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;STRONG&gt;"A specified parameter was not correct. "&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I've written is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;* Function to create alarm on the power state&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;* of the VM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;* @param managed_obj_ref of the VM&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;*/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;vSphereStatus vSphereUserAPI::create_power_state_alarm(ns1__ManagedObjectReference *vm_mor) {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; /* Creates State Alarm Expression */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ns1__StateAlarmExpression state_alarm;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; string red_state = "poweredOff";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; state_alarm.operator_ = ns1__StateAlarmOperator__isEqual;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; state_alarm.type = "VirtualMachine";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; state_alarm.statePath = "runtime.powerState";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; //state_alarm.yellow =&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; state_alarm.red = &amp;amp;red_state;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ns1__AlarmExpression alarm_expression = (ns1__AlarmExpression) state_alarm;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; /* Creates Alarm Setting */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ns1__AlarmSetting alarm_setting;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; alarm_setting.toleranceRange = 0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; alarm_setting.reportingFrequency = 0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; /* Creates the Alarm Spec */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ns1__AlarmSpec alarm_spec;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; alarm_spec.name = "alarm123";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; alarm_spec.description = "Alarm to detect the powered off state of the VM";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; alarm_spec.enabled = true;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; alarm_spec.expression = &amp;amp;alarm_expression;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; //alarm_spec.action =&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; //alarm_spec.actionFrequency =&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; alarm_spec.setting = &amp;amp;alarm_setting;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; /* Creates the Alarm */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ns1__CreateAlarmRequestType create_alarm_req;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; create_alarm_req._USCOREthis = new ns1__ManagedObjectReference();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; create_alarm_req._USCOREthis = service_content-&amp;gt;alarmManager;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; create_alarm_req.entity = vm_mor;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; create_alarm_req.spec = &amp;amp;alarm_spec;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; _ns1__CreateAlarmResponse create_alarm_res;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if (binding_proxy.CreateAlarm(&amp;amp;create_alarm_req, &amp;amp;create_alarm_res) == SOAP_OK) {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt; "\nCreateAlarm successful!" &amp;lt;&amp;lt; endl;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; } else {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; binding_proxy.soap_stream_fault(std::cerr);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return SOAP_ERROR;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; delete create_alarm_req._USCOREthis;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; return STATUS_OK;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly guide me into this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 06:36:08 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788124#M43</guid>
      <dc:creator>pointer_00</dc:creator>
      <dc:date>2012-07-12T06:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problems connecting to VI SDK using C++/gsoap-2.7</title>
      <link>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788125#M44</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..I am trying to compile test.cpp on my Windows machine but keep getting the same error:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;In file included from soapStub.h:12:0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from soapH.h:10,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from soapVimBindingProxy.h:10,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from test.cpp:1:&lt;/P&gt;&lt;P&gt;stdsoap2.h:730:26: fatal error: openssl/bio.h: No such file or directory&lt;/P&gt;&lt;P&gt;compilation terminated.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have installed openssl and set the environment variable for it.&lt;/P&gt;&lt;P&gt;I even tried keeping openssl/bio.h and other files in the same directory and still it won't resolve.&lt;/P&gt;&lt;P&gt;Any help please!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2019 11:04:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Management-SDK-Documents/Problems-connecting-to-VI-SDK-using-C-gsoap-2-7/tac-p/2788125#M44</guid>
      <dc:creator>sg072019</dc:creator>
      <dc:date>2019-07-22T11:04:57Z</dc:date>
    </item>
  </channel>
</rss>

