Hi, I'm new to gSOAP. I'm using the soapcpp2.exe and wsdl2h.exe to generate the 
.h and .cpp files, then tried the sample program on pp. 26 or the manual:

#include "soapH.h" // include all interfaces (library and generated)
#include "calc.nsmap" // import the generated namespace mapping table
int main()
{
 double sum;
struct soap soap; // the gSOAP runtime context
soap_init(&soap); // initialize the context (only once!)
if (soap_call_ns2__add(&soap, NULL, NULL, 1.0, 2.0, &sum) == SOAP_OK)
std::cout << "Sum = " << sum << std::endl;
else // an error occurred
soap_print_fault(&soap, stderr); // display the SOAP fault message on the 
stderr stream
soap_destroy(&soap); // delete deserialized class instances (for C++)
soap_end(&soap); // remove deserialized data and clean up
soap_done(&soap); // detach the gSOAP context
return 0;
}

but the compile error comes as:
.\main.cpp(9) : error C2664: 'soap_call_ns2__add' : cannot convert parameter 6 
from 'double *' to 'double &',

I checked the define in soapStub.h which is included in soapH.h as

SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns2__add(struct soap *soap, const char 
*soap_endpoint, const char *soap_action, double a, double b, double &result);
which seems alright. Then how can I fix the error?

Thank you very much



Reply via email to