Hi Guys:
I'm trying to develop a client with C++ to communicate with vmware web service.
By searching in the forum I've chosen the gsoap way to generate C++ library.
This is how I generated the share object in Ubuntu:
wsdlh -o vim25.h https://192.168.1.220/sdk/vim.wsdl
soacpp2 -x -C -I/usr/local/share/gsoap/import vim25.h
g++-fPIC-I/usr/local/share/gsoap/import-DWITH_OPENSSL-DWITH_COOKIES-c soapClient.cpp
g++-fPIC-I/usr/local/share/gsoap/import-DWITH_OPENSSL-DWITH_COOKIES-c soapC.cpp
g++-I/usr/local/share/gsoap/import-DWITH_OPENSSL-DWITH_COOKIES-shared -o libvimsoap.so soapC.o soapClient.o
Then I copy the share object into /usr/lib, and compile the test.cpp as below:
g++-I/usr/local/share/gsoap/import-DWITH_OPENSSL-DWITH_COOKIES/root/gsoap_2.8.31/gsoap-28/gsoap/stdsoap2.cpp test.cpp -lssl-lcrypto-l gsoapssl++-lpthread-lvimsoap-o vmat
#include<iostream>
#include<cstddef>
#include"soapVimBindingProxy.h"
#include"VimBinding.nsmap"
#include"soapStub.h"
#include"soapH.h"
#include<time.h>
#include<iostream>
usingnamespace std;
void sigpipe_handle(int x){ cout <<"sigpipe "<< x << endl;}
int main(){
VimBinding vim;
int a =1;
return a;
}
This test program just did not except define a "Vimbinding" variable here.
In the compiling I got the following error message here:
test.cpp:14:5: error:‘VimBinding’ was not declared in this scope
VimBinding vim;
^
I'm a newbei in this, could any of you guys kindly help to give some advice here, thanks a lot!