#include "src/gsoap/soapOtalierService.h"
int main(int argc, char *argv[])
{
int soapMessage = SOAP_OK;
std::string queryString = getenv("QUERY_STRING");
OtalierService service;
if(queryString == "wsdl")
{
service.http_content = "text/xml";
soap_response(&service, SOAP_FILE);
FILE *fd = 0;
fd = fopen("Otalier.wsdl", "rb");
bool fileRead = true;
while(fileRead)
{
size_t r = fread(service.tmpbuf, 1, sizeof(service.tmpbuf), fd);
if (!r || soap_send_raw(&service, service.tmpbuf, r))
{
fileRead = false;
}
}
fclose(fd);
soap_end_send(&service);
}else
{
//soap_set_omode(&service, SOAP_C_UTFSTRING);
service.serve();
}
QTimer::singleShot(0,
qApp,
SLOT(quit
()));
a.exec();
return soapMessage;
}
#include "src/gsoap/soapOtalierService.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
int soapMessage = SOAP_OK;
std::string queryString = getenv("QUERY_STRING");
OtalierService service;
if(queryString == "wsdl")
{
service.http_content = "text/xml";
soap_response(&service, SOAP_FILE);
FILE *fd = 0;
fd = fopen("Otalier.wsdl", "rb");
bool fileRead = true;
while(fileRead)
{
size_t r = fread(service.tmpbuf, 1, sizeof(service.tmpbuf), fd);
if (!r || soap_send_raw(&service, service.tmpbuf, r))
{
fileRead = false;
}
}
fclose(fd);
soap_end_send(&service);
}else
{
//soap_set_omode(&service, SOAP_C_UTFSTRING);
service.serve();
}
QTimer::singleShot(0, qApp, SLOT(quit()));
a.exec();
return soapMessage;
}
To copy to clipboard, switch view to plain text mode
Bookmarks