264 lines
8.5 KiB
C++
264 lines
8.5 KiB
C++
/* IAGWMMScapServiceSoapBindingService.cpp
|
|
Generated by gSOAP 2.8.6 from IagwMms.h
|
|
|
|
Copyright(C) 2000-2011, Robert van Engelen, Genivia Inc. All Rights Reserved.
|
|
The generated code is released under one of the following licenses:
|
|
1) GPL or 2) Genivia's license for commercial use.
|
|
This program is released under the GPL with the additional exemption that
|
|
compiling, linking, and/or using OpenSSL is allowed.
|
|
*/
|
|
|
|
#include "IAGWMMScapServiceSoapBindingService.h"
|
|
|
|
namespace IAGWMMS {
|
|
|
|
capServiceSoapBindingService::capServiceSoapBindingService()
|
|
{ capServiceSoapBindingService_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
|
|
}
|
|
|
|
capServiceSoapBindingService::capServiceSoapBindingService(const struct soap &_soap) : soap(_soap)
|
|
{ }
|
|
|
|
capServiceSoapBindingService::capServiceSoapBindingService(soap_mode iomode)
|
|
{ capServiceSoapBindingService_init(iomode, iomode);
|
|
}
|
|
|
|
capServiceSoapBindingService::capServiceSoapBindingService(soap_mode imode, soap_mode omode)
|
|
{ capServiceSoapBindingService_init(imode, omode);
|
|
}
|
|
|
|
capServiceSoapBindingService::~capServiceSoapBindingService()
|
|
{ }
|
|
|
|
void capServiceSoapBindingService::capServiceSoapBindingService_init(soap_mode imode, soap_mode omode)
|
|
{ soap_imode(this, imode);
|
|
soap_omode(this, omode);
|
|
static const struct Namespace namespaces[] =
|
|
{
|
|
{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL},
|
|
{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL},
|
|
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
|
|
{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
|
|
{"ns1", "http://www.bnet.cn/v3.0/", NULL, NULL},
|
|
{NULL, NULL, NULL, NULL}
|
|
};
|
|
soap_set_namespaces(this, namespaces);
|
|
};
|
|
|
|
void capServiceSoapBindingService::destroy()
|
|
{ soap_destroy(this);
|
|
soap_end(this);
|
|
}
|
|
|
|
#ifndef WITH_PURE_VIRTUAL
|
|
capServiceSoapBindingService *capServiceSoapBindingService::copy()
|
|
{ capServiceSoapBindingService *dup = SOAP_NEW_COPY(capServiceSoapBindingService(*(struct soap*)this));
|
|
return dup;
|
|
}
|
|
#endif
|
|
|
|
int capServiceSoapBindingService::soap_close_socket()
|
|
{ return soap_closesock(this);
|
|
}
|
|
|
|
int capServiceSoapBindingService::soap_force_close_socket()
|
|
{ return soap_force_closesock(this);
|
|
}
|
|
|
|
int capServiceSoapBindingService::soap_senderfault(const char *string, const char *detailXML)
|
|
{ return ::soap_sender_fault(this, string, detailXML);
|
|
}
|
|
|
|
int capServiceSoapBindingService::soap_senderfault(const char *subcodeQName, const char *string, const char *detailXML)
|
|
{ return ::soap_sender_fault_subcode(this, subcodeQName, string, detailXML);
|
|
}
|
|
|
|
int capServiceSoapBindingService::soap_receiverfault(const char *string, const char *detailXML)
|
|
{ return ::soap_receiver_fault(this, string, detailXML);
|
|
}
|
|
|
|
int capServiceSoapBindingService::soap_receiverfault(const char *subcodeQName, const char *string, const char *detailXML)
|
|
{ return ::soap_receiver_fault_subcode(this, subcodeQName, string, detailXML);
|
|
}
|
|
|
|
void capServiceSoapBindingService::soap_print_fault(FILE *fd)
|
|
{ ::soap_print_fault(this, fd);
|
|
}
|
|
|
|
#ifndef WITH_LEAN
|
|
#ifndef WITH_COMPAT
|
|
void capServiceSoapBindingService::soap_stream_fault(std::ostream& os)
|
|
{ ::soap_stream_fault(this, os);
|
|
}
|
|
#endif
|
|
|
|
char *capServiceSoapBindingService::soap_sprint_fault(char *buf, size_t len)
|
|
{ return ::soap_sprint_fault(this, buf, len);
|
|
}
|
|
#endif
|
|
|
|
void capServiceSoapBindingService::soap_noheader()
|
|
{ this->header = NULL;
|
|
}
|
|
|
|
const SOAP_ENV__Header *capServiceSoapBindingService::soap_header()
|
|
{ return this->header;
|
|
}
|
|
|
|
int capServiceSoapBindingService::run(int port)
|
|
{ if (soap_valid_socket(bind(NULL, port, 100)))
|
|
{ for (;;)
|
|
{ if (!soap_valid_socket(accept()) || serve())
|
|
return this->error;
|
|
soap_destroy(this);
|
|
soap_end(this);
|
|
}
|
|
}
|
|
else
|
|
return this->error;
|
|
return SOAP_OK;
|
|
}
|
|
|
|
SOAP_SOCKET capServiceSoapBindingService::bind(const char *host, int port, int backlog)
|
|
{ return soap_bind(this, host, port, backlog);
|
|
}
|
|
|
|
SOAP_SOCKET capServiceSoapBindingService::accept()
|
|
{ return soap_accept(this);
|
|
}
|
|
|
|
int capServiceSoapBindingService::serve()
|
|
{
|
|
#ifndef WITH_FASTCGI
|
|
unsigned int k = this->max_keep_alive;
|
|
#endif
|
|
do
|
|
{
|
|
|
|
#ifndef WITH_FASTCGI
|
|
if (this->max_keep_alive > 0 && !--k)
|
|
this->keep_alive = 0;
|
|
#endif
|
|
|
|
if (soap_begin_serve(this))
|
|
{ if (this->error >= SOAP_STOP)
|
|
continue;
|
|
return this->error;
|
|
}
|
|
if (dispatch() || (this->fserveloop && this->fserveloop(this)))
|
|
{
|
|
#ifdef WITH_FASTCGI
|
|
soap_send_fault(this);
|
|
#else
|
|
return soap_send_fault(this);
|
|
#endif
|
|
}
|
|
|
|
#ifdef WITH_FASTCGI
|
|
soap_destroy(this);
|
|
soap_end(this);
|
|
} while (1);
|
|
#else
|
|
} while (this->keep_alive);
|
|
#endif
|
|
return SOAP_OK;
|
|
}
|
|
|
|
static int serve___ns1__ExecuteInvoke(capServiceSoapBindingService*);
|
|
static int serve___ns1__EncodeString(capServiceSoapBindingService*);
|
|
|
|
int capServiceSoapBindingService::dispatch()
|
|
{ soap_peek_element(this);
|
|
if (!soap_match_tag(this, this->tag, "ns1:reqXml"))
|
|
return serve___ns1__ExecuteInvoke(this);
|
|
if (!soap_match_tag(this, this->tag, "ns1:decode"))
|
|
return serve___ns1__EncodeString(this);
|
|
return this->error = SOAP_NO_METHOD;
|
|
}
|
|
|
|
static int serve___ns1__ExecuteInvoke(capServiceSoapBindingService *soap)
|
|
{ struct __ns1__ExecuteInvoke soap_tmp___ns1__ExecuteInvoke;
|
|
struct __ns1__ExecuteInvokeResponse soap_tmp___ns1__ExecuteInvokeResponse;
|
|
soap_default___ns1__ExecuteInvokeResponse(soap, &soap_tmp___ns1__ExecuteInvokeResponse);
|
|
soap_default___ns1__ExecuteInvoke(soap, &soap_tmp___ns1__ExecuteInvoke);
|
|
soap->encodingStyle = NULL;
|
|
if (!soap_get___ns1__ExecuteInvoke(soap, &soap_tmp___ns1__ExecuteInvoke, "-ns1:ExecuteInvoke", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = soap->ExecuteInvoke(soap_tmp___ns1__ExecuteInvoke.ns1__reqXml, soap_tmp___ns1__ExecuteInvokeResponse.ns1__ExecuteInvokeReturn);
|
|
if (soap->error)
|
|
return soap->error;
|
|
soap_serializeheader(soap);
|
|
soap_serialize___ns1__ExecuteInvokeResponse(soap, &soap_tmp___ns1__ExecuteInvokeResponse);
|
|
if (soap_begin_count(soap))
|
|
return soap->error;
|
|
if (soap->mode & SOAP_IO_LENGTH)
|
|
{ if (soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put___ns1__ExecuteInvokeResponse(soap, &soap_tmp___ns1__ExecuteInvokeResponse, "-ns1:ExecuteInvokeResponse", NULL)
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap))
|
|
return soap->error;
|
|
};
|
|
if (soap_end_count(soap)
|
|
|| soap_response(soap, SOAP_OK)
|
|
|| soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put___ns1__ExecuteInvokeResponse(soap, &soap_tmp___ns1__ExecuteInvokeResponse, "-ns1:ExecuteInvokeResponse", NULL)
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap)
|
|
|| soap_end_send(soap))
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
static int serve___ns1__EncodeString(capServiceSoapBindingService *soap)
|
|
{ struct __ns1__EncodeString soap_tmp___ns1__EncodeString;
|
|
struct __ns1__EncodeStringResponse soap_tmp___ns1__EncodeStringResponse;
|
|
soap_default___ns1__EncodeStringResponse(soap, &soap_tmp___ns1__EncodeStringResponse);
|
|
soap_default___ns1__EncodeString(soap, &soap_tmp___ns1__EncodeString);
|
|
soap->encodingStyle = NULL;
|
|
if (!soap_get___ns1__EncodeString(soap, &soap_tmp___ns1__EncodeString, "-ns1:EncodeString", NULL))
|
|
return soap->error;
|
|
if (soap_body_end_in(soap)
|
|
|| soap_envelope_end_in(soap)
|
|
|| soap_end_recv(soap))
|
|
return soap->error;
|
|
soap->error = soap->EncodeString(soap_tmp___ns1__EncodeString.ns1__decode, soap_tmp___ns1__EncodeStringResponse.ns1__EncodeStringReturn);
|
|
if (soap->error)
|
|
return soap->error;
|
|
soap_serializeheader(soap);
|
|
soap_serialize___ns1__EncodeStringResponse(soap, &soap_tmp___ns1__EncodeStringResponse);
|
|
if (soap_begin_count(soap))
|
|
return soap->error;
|
|
if (soap->mode & SOAP_IO_LENGTH)
|
|
{ if (soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put___ns1__EncodeStringResponse(soap, &soap_tmp___ns1__EncodeStringResponse, "-ns1:EncodeStringResponse", NULL)
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap))
|
|
return soap->error;
|
|
};
|
|
if (soap_end_count(soap)
|
|
|| soap_response(soap, SOAP_OK)
|
|
|| soap_envelope_begin_out(soap)
|
|
|| soap_putheader(soap)
|
|
|| soap_body_begin_out(soap)
|
|
|| soap_put___ns1__EncodeStringResponse(soap, &soap_tmp___ns1__EncodeStringResponse, "-ns1:EncodeStringResponse", NULL)
|
|
|| soap_body_end_out(soap)
|
|
|| soap_envelope_end_out(soap)
|
|
|| soap_end_send(soap))
|
|
return soap->error;
|
|
return soap_closesock(soap);
|
|
}
|
|
|
|
} // namespace IAGWMMS
|
|
|
|
/* End of server object code */
|