I am trying to build my first gSoap application. Even the calc example given wouldn't compile for me. I followed the readme file, and did the following:
converted the wsdl to a header with the provided tool (
wsdl2h -s -o calc.h http://www.cs.fsu.edu/~engelen/calc.wsdl
)Used
soapcpp2
with the generatedcalc.h
(soapcpp2 -i calc.h
)Created a new project, added a "soap" directory, and copied the following files there:
calc.nsmap, soapC.cpp, soapcalcProxy.h, soapH.h, soapStub.h, stdsoap2.h, stdsoap2.cpp
Wrote this piece of code:
#include "soap/soapcalcProxy.h" #include "soap/calc.nsmap" int main() { calcProxy service; double result; if (service.add(1.0, 2.0, result) == SOAP_OK) std::cout << "The sum is " << result << std::endl; else service.soap_stream_fault(std::cerr); }
Tried to compile
make all Building file: ../soap/soapC.cpp Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"soap/soapC.d" -MT"soap/soapC.d" -o "soap/soapC.o" "../soap/soapC.cpp" ../soap/soapC.cpp: In function ‘int soap_out_SOAP_ENV__Reason(soap*, const char*, int, const SOAP_ENV__Reason*, const char*)’: ../soap/soapC.cpp:914:48: error: too many arguments to function ‘int soap_set_attr(soap*, const char*, const char*)’ ../soap/stdsoap2.h:2384:27: note: declared here make: *** [soap/soapC.o] Error 1
It complains about wrong number of arguments in a generated file. What am I doing wrong?