/* ISAGMMSMessageNotificationBindingService.cpp Generated by gSOAP 2.8.6 from IsagMms.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 "ISAGMMSMessageNotificationBindingService.h" namespace ISAGMMS { MessageNotificationBindingService::MessageNotificationBindingService() { MessageNotificationBindingService_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT); } MessageNotificationBindingService::MessageNotificationBindingService(const struct soap &_soap) : soap(_soap) { } MessageNotificationBindingService::MessageNotificationBindingService(soap_mode iomode) { MessageNotificationBindingService_init(iomode, iomode); } MessageNotificationBindingService::MessageNotificationBindingService(soap_mode imode, soap_mode omode) { MessageNotificationBindingService_init(imode, omode); } MessageNotificationBindingService::~MessageNotificationBindingService() { } void MessageNotificationBindingService::MessageNotificationBindingService_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}, {"ns3", "http://www.chinatelecom.com.cn/schema/ctcc/multimedia_messaging/v2_2", NULL, NULL}, {"ns4", "http://www.chinatelecom.com.cn/schema/ctcc/common/v2_1", NULL, NULL}, {"ns1", "http://www.chinatelecom.com.cn/wsdl/ctcc/multimedia_messaging/notification/v2_2/service", NULL, NULL}, {"ns2", "http://www.chinatelecom.com.cn/schema/ctcc/multimedia_messaging/notification/v2_2/local", NULL, NULL}, {NULL, NULL, NULL, NULL} }; soap_set_namespaces(this, namespaces); }; void MessageNotificationBindingService::destroy() { soap_destroy(this); soap_end(this); } #ifndef WITH_PURE_VIRTUAL MessageNotificationBindingService *MessageNotificationBindingService::copy() { MessageNotificationBindingService *dup = SOAP_NEW_COPY(MessageNotificationBindingService(*(struct soap*)this)); return dup; } #endif int MessageNotificationBindingService::soap_close_socket() { return soap_closesock(this); } int MessageNotificationBindingService::soap_force_close_socket() { return soap_force_closesock(this); } int MessageNotificationBindingService::soap_senderfault(const char *string, const char *detailXML) { return ::soap_sender_fault(this, string, detailXML); } int MessageNotificationBindingService::soap_senderfault(const char *subcodeQName, const char *string, const char *detailXML) { return ::soap_sender_fault_subcode(this, subcodeQName, string, detailXML); } int MessageNotificationBindingService::soap_receiverfault(const char *string, const char *detailXML) { return ::soap_receiver_fault(this, string, detailXML); } int MessageNotificationBindingService::soap_receiverfault(const char *subcodeQName, const char *string, const char *detailXML) { return ::soap_receiver_fault_subcode(this, subcodeQName, string, detailXML); } void MessageNotificationBindingService::soap_print_fault(FILE *fd) { ::soap_print_fault(this, fd); } #ifndef WITH_LEAN #ifndef WITH_COMPAT void MessageNotificationBindingService::soap_stream_fault(std::ostream& os) { ::soap_stream_fault(this, os); } #endif char *MessageNotificationBindingService::soap_sprint_fault(char *buf, size_t len) { return ::soap_sprint_fault(this, buf, len); } #endif void MessageNotificationBindingService::soap_noheader() { this->header = NULL; } const SOAP_ENV__Header *MessageNotificationBindingService::soap_header() { return this->header; } int MessageNotificationBindingService::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 MessageNotificationBindingService::bind(const char *host, int port, int backlog) { return soap_bind(this, host, port, backlog); } SOAP_SOCKET MessageNotificationBindingService::accept() { return soap_accept(this); } int MessageNotificationBindingService::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__notifyMessageReception(MessageNotificationBindingService*); static int serve___ns1__notifyMessageDeliveryReceipt(MessageNotificationBindingService*); int MessageNotificationBindingService::dispatch() { soap_peek_element(this); if (!soap_match_tag(this, this->tag, "ns2:notifyMessageReception")) return serve___ns1__notifyMessageReception(this); if (!soap_match_tag(this, this->tag, "ns2:notifyMessageDeliveryReceipt")) return serve___ns1__notifyMessageDeliveryReceipt(this); return this->error = SOAP_NO_METHOD; } static int serve___ns1__notifyMessageReception(MessageNotificationBindingService *soap) { struct __ns1__notifyMessageReception soap_tmp___ns1__notifyMessageReception; ns2__notifyMessageReceptionResponse ns2__notifyMessageReceptionResponse_; ns2__notifyMessageReceptionResponse_.soap_default(soap); soap_default___ns1__notifyMessageReception(soap, &soap_tmp___ns1__notifyMessageReception); soap->encodingStyle = NULL; if (!soap_get___ns1__notifyMessageReception(soap, &soap_tmp___ns1__notifyMessageReception, "-ns1:notifyMessageReception", 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->notifyMessageReception(soap_tmp___ns1__notifyMessageReception.ns2__notifyMessageReception_, &ns2__notifyMessageReceptionResponse_); if (soap->error) return soap->error; soap_serializeheader(soap); ns2__notifyMessageReceptionResponse_.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) || ns2__notifyMessageReceptionResponse_.soap_put(soap, "ns2:notifyMessageReceptionResponse", "") || 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) || ns2__notifyMessageReceptionResponse_.soap_put(soap, "ns2:notifyMessageReceptionResponse", "") || 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__notifyMessageDeliveryReceipt(MessageNotificationBindingService *soap) { struct __ns1__notifyMessageDeliveryReceipt soap_tmp___ns1__notifyMessageDeliveryReceipt; ns2__notifyMessageDeliveryReceiptResponse ns2__notifyMessageDeliveryReceiptResponse_; ns2__notifyMessageDeliveryReceiptResponse_.soap_default(soap); soap_default___ns1__notifyMessageDeliveryReceipt(soap, &soap_tmp___ns1__notifyMessageDeliveryReceipt); soap->encodingStyle = NULL; if (!soap_get___ns1__notifyMessageDeliveryReceipt(soap, &soap_tmp___ns1__notifyMessageDeliveryReceipt, "-ns1:notifyMessageDeliveryReceipt", 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->notifyMessageDeliveryReceipt(soap_tmp___ns1__notifyMessageDeliveryReceipt.ns2__notifyMessageDeliveryReceipt_, &ns2__notifyMessageDeliveryReceiptResponse_); if (soap->error) return soap->error; soap_serializeheader(soap); ns2__notifyMessageDeliveryReceiptResponse_.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) || ns2__notifyMessageDeliveryReceiptResponse_.soap_put(soap, "ns2:notifyMessageDeliveryReceiptResponse", "") || 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) || ns2__notifyMessageDeliveryReceiptResponse_.soap_put(soap, "ns2:notifyMessageDeliveryReceiptResponse", "") || soap_body_end_out(soap) || soap_envelope_end_out(soap) || soap_end_send(soap)) return soap->error; return soap_closesock(soap); } } // namespace ISAGMMS /* End of server object code */