I used xd tool to generate a embbed version of my wsdl and store it a wsdl.h file with this command line (I`m doing this in my CMakeList.txt):
${GSOAP_ROOT_DIR}/bin/win32/xd -dwsdl ${CMAKE_CURRENT_BINARY_DIR}/${SOAP_NAME_SERVICE}.wsdl > ${CMAKE_CURRENT_BINARY_DIR}/wsdl.h
After that, I implemented this function, that can be better to lead with parameters in GET request:
int http_get(struct soap *soap)
{
soap_response(soap, SOAP_HTML); // HTTP response header with text/html
soap_send(soap, (const char*)wsdl);
soap_end_send(soap);
return SOAP_OK;
}
So, I configure this function to lead with all GET commands received by gSoap:
.
.
.
struct soap soap;
soap_init(&soap);
soap.fget = http_get;
.
.
.
Then, when your server receive a HTTP/GET request, your function will be called and send the wsdl file. If you want, you can read WSDL file at runtime and send in soap_send() instead to embbed WSDL in your code like I did.