FXSend/MMS_mm7/IMm7MMSmm7SoapBindingService.cpp
2025-02-28 17:05:50 +08:00

308 lines
9.2 KiB
C++

/* IMm7MMSmm7SoapBindingService.cpp
Generated by gSOAP 2.8.6 from IMm7MMS.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 "IMm7MMSmm7SoapBindingService.h"
namespace IMm7MMS {
mm7SoapBindingService::mm7SoapBindingService()
{ mm7SoapBindingService_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
}
mm7SoapBindingService::mm7SoapBindingService(const struct soap &_soap) : soap(_soap)
{ }
mm7SoapBindingService::mm7SoapBindingService(soap_mode iomode)
{ mm7SoapBindingService_init(iomode, iomode);
}
mm7SoapBindingService::mm7SoapBindingService(soap_mode imode, soap_mode omode)
{ mm7SoapBindingService_init(imode, omode);
}
mm7SoapBindingService::~mm7SoapBindingService()
{ }
void mm7SoapBindingService::mm7SoapBindingService_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.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-0", NULL, NULL},
{NULL, NULL, NULL, NULL}
};
soap_set_namespaces(this, namespaces);
};
void mm7SoapBindingService::destroy()
{ soap_destroy(this);
soap_end(this);
}
#ifndef WITH_PURE_VIRTUAL
mm7SoapBindingService *mm7SoapBindingService::copy()
{ mm7SoapBindingService *dup = SOAP_NEW_COPY(mm7SoapBindingService(*(struct soap*)this));
return dup;
}
#endif
int mm7SoapBindingService::soap_close_socket()
{ return soap_closesock(this);
}
int mm7SoapBindingService::soap_force_close_socket()
{ return soap_force_closesock(this);
}
int mm7SoapBindingService::soap_senderfault(const char *string, const char *detailXML)
{ return ::soap_sender_fault(this, string, detailXML);
}
int mm7SoapBindingService::soap_senderfault(const char *subcodeQName, const char *string, const char *detailXML)
{ return ::soap_sender_fault_subcode(this, subcodeQName, string, detailXML);
}
int mm7SoapBindingService::soap_receiverfault(const char *string, const char *detailXML)
{ return ::soap_receiver_fault(this, string, detailXML);
}
int mm7SoapBindingService::soap_receiverfault(const char *subcodeQName, const char *string, const char *detailXML)
{ return ::soap_receiver_fault_subcode(this, subcodeQName, string, detailXML);
}
void mm7SoapBindingService::soap_print_fault(FILE *fd)
{ ::soap_print_fault(this, fd);
}
#ifndef WITH_LEAN
#ifndef WITH_COMPAT
void mm7SoapBindingService::soap_stream_fault(std::ostream& os)
{ ::soap_stream_fault(this, os);
}
#endif
char *mm7SoapBindingService::soap_sprint_fault(char *buf, size_t len)
{ return ::soap_sprint_fault(this, buf, len);
}
#endif
void mm7SoapBindingService::soap_noheader()
{ this->header = NULL;
}
const SOAP_ENV__Header *mm7SoapBindingService::soap_header()
{ return this->header;
}
int mm7SoapBindingService::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 mm7SoapBindingService::bind(const char *host, int port, int backlog)
{ return soap_bind(this, host, port, backlog);
}
SOAP_SOCKET mm7SoapBindingService::accept()
{ return soap_accept(this);
}
int mm7SoapBindingService::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__submitReq(mm7SoapBindingService*);
static int serve___ns1__deliverReq(mm7SoapBindingService*);
static int serve___ns1__deliveryReportReq(mm7SoapBindingService*);
int mm7SoapBindingService::dispatch()
{ soap_peek_element(this);
if (!soap_match_tag(this, this->tag, "ns1:SubmitReq"))
return serve___ns1__submitReq(this);
if (!soap_match_tag(this, this->tag, "ns1:DeliverReq"))
return serve___ns1__deliverReq(this);
if (!soap_match_tag(this, this->tag, "ns1:DeliveryReportReq"))
return serve___ns1__deliveryReportReq(this);
return this->error = SOAP_NO_METHOD;
}
static int serve___ns1__submitReq(mm7SoapBindingService *soap)
{ struct __ns1__submitReq soap_tmp___ns1__submitReq;
ns1__submitRspType ns1__SubmitRsp;
ns1__SubmitRsp.soap_default(soap);
soap_default___ns1__submitReq(soap, &soap_tmp___ns1__submitReq);
soap->encodingStyle = NULL;
if (!soap_get___ns1__submitReq(soap, &soap_tmp___ns1__submitReq, "-ns1:submitReq", 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->submitReq(soap_tmp___ns1__submitReq.ns1__SubmitReq, &ns1__SubmitRsp);
if (soap->error)
return soap->error;
soap_serializeheader(soap);
ns1__SubmitRsp.soap_serialize(soap);
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)
|| ns1__SubmitRsp.soap_put(soap, "ns1:SubmitRsp", "")
|| 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)
|| ns1__SubmitRsp.soap_put(soap, "ns1:SubmitRsp", "")
|| 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__deliverReq(mm7SoapBindingService *soap)
{ struct __ns1__deliverReq soap_tmp___ns1__deliverReq;
ns1__deliverRspType ns1__DeliverRsp;
ns1__DeliverRsp.soap_default(soap);
soap_default___ns1__deliverReq(soap, &soap_tmp___ns1__deliverReq);
soap->encodingStyle = NULL;
if (!soap_get___ns1__deliverReq(soap, &soap_tmp___ns1__deliverReq, "-ns1:deliverReq", 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->deliverReq(soap_tmp___ns1__deliverReq.ns1__DeliverReq, &ns1__DeliverRsp);
if (soap->error)
return soap->error;
soap_serializeheader(soap);
ns1__DeliverRsp.soap_serialize(soap);
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)
|| ns1__DeliverRsp.soap_put(soap, "ns1:DeliverRsp", "")
|| 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)
|| ns1__DeliverRsp.soap_put(soap, "ns1:DeliverRsp", "")
|| 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__deliveryReportReq(mm7SoapBindingService *soap)
{ struct __ns1__deliveryReportReq soap_tmp___ns1__deliveryReportReq;
ns1__genericResponseType ns1__DeliveryReportRsp;
ns1__DeliveryReportRsp.soap_default(soap);
soap_default___ns1__deliveryReportReq(soap, &soap_tmp___ns1__deliveryReportReq);
soap->encodingStyle = NULL;
if (!soap_get___ns1__deliveryReportReq(soap, &soap_tmp___ns1__deliveryReportReq, "-ns1:deliveryReportReq", 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->deliveryReportReq(soap_tmp___ns1__deliveryReportReq.ns1__DeliveryReportReq, &ns1__DeliveryReportRsp);
if (soap->error)
return soap->error;
soap_serializeheader(soap);
ns1__DeliveryReportRsp.soap_serialize(soap);
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)
|| ns1__DeliveryReportRsp.soap_put(soap, "ns1:DeliveryReportRsp", "")
|| 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)
|| ns1__DeliveryReportRsp.soap_put(soap, "ns1:DeliveryReportRsp", "")
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap->error;
return soap_closesock(soap);
}
} // namespace IMm7MMS
/* End of server object code */