VMware {code} Community
praveenps
Contributor
Contributor

gsoap/c++ connection to VMware ESX Server 3.5.0

Hi,

I tried to build the attached code and connect with esm 3.5 host, but it fails. FOllowing is the output. I have copied the "rui.crt" file from ESX host (/etc/vmware/ssl dir). Please help!

RetrieveServiceContent - OK

fullName: VMware ESX Server 3.5.0 build-153875

name: VMware ESX Server

build: 153875

version: 3.5.0

test1.cpp 78

SOAP 1.1 fault: "":ServerFaultCode

"type"

Detail:

Thanks

0 Kudos
4 Replies
stumpr
Virtuoso
Virtuoso

It looks right, are you using any weird characters in your login name/password or URL strings? Did you compile with cookies and ssl support?

Reuben Stump | http://www.virtuin.com | @ReubenStump
0 Kudos
praveenps
Contributor
Contributor

Hi Stumpr,

First, Thanks for responding.

Yes, I have compiled the code with macros (-DWITH_OPENSSL -DWITH_COOKIES). Following is the command/files used for linking.

g++ -o login test1.o soapClient.o soapC.o -L/gsoap/gsoap-2.7/gsoap -lgsoapssl++ -lssl -lcrypto

As mentioned earlier i have copied the "rui.crt" from the esx host (/etc/vmware/ssl/rui.crt, this is the default one) i`am trying to connect to the client box (from where i`am running the login executable).

When i try to connect to the same esx host using VI Client, the security warning (certificate warning) dialog box comes up. If i click "ignore" then it connects to the host.

Let me know if any specific information is required.

Thanks.

0 Kudos
stumpr
Virtuoso
Virtuoso

You have to compile everything with -DWITH_OPENSSL -DWITH_COOKIES, even your final executable and all object file dependencies. You may want to create a Makefile for this to be sure you don't miss a step.

From what I saw of the code, it's almost unmodified from what I have for a simple connection test. I'd probably put my energies on making sure you have the compiler flags consistent on all your sources and final program.

You could also just do the program without a certificate check, similar to your ignore in the VI Client UI with SOAP_SSL_NO_AUTHENTICATION. If that works, then it might be a problem with your rui.crt.

Reuben Stump | http://www.virtuin.com | @ReubenStump
praveenps
Contributor
Contributor

Thanks stumpr for getting me started with this. As you pointed out there was some issue with the compilation. Now i can connect to esx i=using the code.

0 Kudos