Search code examples
c++soapgsoap

gSoap isn't including the Envelope and Body opening tags


The way I'm currently using gSoap, is:

soap_init(soapObj);
soap_new_set__ns1__CheckServer(soapObj);
soap_call__ns1__CheckServer(soapObj, NULL, NULL, objCheckServer, objResponse);

And after checking the SENT.log, i can see that the envelope that we're sending doesn't contain the <SOAP-ENV: Envelope>, <SOAP-ENV: Header>, or the <SOAP-ENV: Body> tag. It just starts with <ns1: CheckServer> and begins declaring name spaces. Is there an initialization that we're missing or is this code just buggy?


Solution

  • The solution that fixed it was to set the version.

    soap_set_version(soapObj, 2)