/* ISAGSMSSmsNotificationBindingService.cpp Generated by gSOAP 2.8.6 from IsagSms.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 "ISAGSMSSmsNotificationBindingService.h" namespace ISAGSMS { SmsNotificationBindingService::SmsNotificationBindingService() { SmsNotificationBindingService_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT); } SmsNotificationBindingService::SmsNotificationBindingService(const struct soap &_soap) : soap(_soap) { } SmsNotificationBindingService::SmsNotificationBindingService(soap_mode iomode) { SmsNotificationBindingService_init(iomode, iomode); } SmsNotificationBindingService::SmsNotificationBindingService(soap_mode imode, soap_mode omode) { SmsNotificationBindingService_init(imode, omode); } SmsNotificationBindingService::~SmsNotificationBindingService() { } void SmsNotificationBindingService::SmsNotificationBindingService_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/sms/v2_1", NULL, NULL}, {"ns4", "http://www.chinatelecom.com.cn/schema/ctcc/common/v2_1", NULL, NULL}, {"ns1", "http://www.chinatelecom.com.cn/wsdl/ctcc/sms/notification/v2_1/service", NULL, NULL}, {"ns2", "http://www.chinatelecom.com.cn/schema/ctcc/sms/notification/v2_1/local", NULL, NULL}, {NULL, NULL, NULL, NULL} }; soap_set_namespaces(this, namespaces); }; void SmsNotificationBindingService::destroy() { soap_destroy(this); soap_end(this); } #ifndef WITH_PURE_VIRTUAL SmsNotificationBindingService *SmsNotificationBindingService::copy() { SmsNotificationBindingService *dup = SOAP_NEW_COPY(SmsNotificationBindingService(*(struct soap*)this)); return dup; } #endif int SmsNotificationBindingService::soap_close_socket() { return soap_closesock(this); } int SmsNotificationBindingService::soap_force_close_socket() { return soap_force_closesock(this); } int SmsNotificationBindingService::soap_senderfault(const char *string, const char *detailXML) { return ::soap_sender_fault(this, string, detailXML); } int SmsNotificationBindingService::soap_senderfault(const char *subcodeQName, const char *string, const char *detailXML) { return ::soap_sender_fault_subcode(this, subcodeQName, string, detailXML); } int SmsNotificationBindingService::soap_receiverfault(const char *string, const char *detailXML) { return ::soap_receiver_fault(this, string, detailXML); } int SmsNotificationBindingService::soap_receiverfault(const char *subcodeQName, const char *string, const char *detailXML) { return ::soap_receiver_fault_subcode(this, subcodeQName, string, detailXML); } void SmsNotificationBindingService::soap_print_fault(FILE *fd) { ::soap_print_fault(this, fd); } #ifndef WITH_LEAN #ifndef WITH_COMPAT void SmsNotificationBindingService::soap_stream_fault(std::ostream& os) { ::soap_stream_fault(this, os); } #endif char *SmsNotificationBindingService::soap_sprint_fault(char *buf, size_t len) { return ::soap_sprint_fault(this, buf, len); } #endif void SmsNotificationBindingService::soap_noheader() { this->header = NULL; } const SOAP_ENV__Header *SmsNotificationBindingService::soap_header() { return this->header; } int SmsNotificationBindingService::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 SmsNotificationBindingService::bind(const char *host, int port, int backlog) { return soap_bind(this, host, port, backlog); } SOAP_SOCKET SmsNotificationBindingService::accept() { return soap_accept(this); } int SmsNotificationBindingService::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__notifySmsReception(SmsNotificationBindingService*); static int serve___ns1__notifySmsDeliveryReceipt(SmsNotificationBindingService*); int SmsNotificationBindingService::dispatch() { soap_peek_element(this); if (!soap_match_tag(this, this->tag, "ns2:notifySmsReception")) return serve___ns1__notifySmsReception(this); if (!soap_match_tag(this, this->tag, "ns2:notifySmsDeliveryReceipt")) return serve___ns1__notifySmsDeliveryReceipt(this); return this->error = SOAP_NO_METHOD; } static int serve___ns1__notifySmsReception(SmsNotificationBindingService *soap) { struct __ns1__notifySmsReception soap_tmp___ns1__notifySmsReception; ns2__notifySmsReceptionResponse ns2__notifySmsReceptionResponse_; ns2__notifySmsReceptionResponse_.soap_default(soap); soap_default___ns1__notifySmsReception(soap, &soap_tmp___ns1__notifySmsReception); soap->encodingStyle = NULL; if (!soap_get___ns1__notifySmsReception(soap, &soap_tmp___ns1__notifySmsReception, "-ns1:notifySmsReception", 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->notifySmsReception(soap_tmp___ns1__notifySmsReception.ns2__notifySmsReception_, &ns2__notifySmsReceptionResponse_); if (soap->error) return soap->error; soap_serializeheader(soap); ns2__notifySmsReceptionResponse_.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__notifySmsReceptionResponse_.soap_put(soap, "ns2:notifySmsReceptionResponse", "") || 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__notifySmsReceptionResponse_.soap_put(soap, "ns2:notifySmsReceptionResponse", "") || 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__notifySmsDeliveryReceipt(SmsNotificationBindingService *soap) { struct __ns1__notifySmsDeliveryReceipt soap_tmp___ns1__notifySmsDeliveryReceipt; ns2__notifySmsDeliveryReceiptResponse ns2__notifySmsDeliveryReceiptResponse_; ns2__notifySmsDeliveryReceiptResponse_.soap_default(soap); soap_default___ns1__notifySmsDeliveryReceipt(soap, &soap_tmp___ns1__notifySmsDeliveryReceipt); soap->encodingStyle = NULL; if (!soap_get___ns1__notifySmsDeliveryReceipt(soap, &soap_tmp___ns1__notifySmsDeliveryReceipt, "-ns1:notifySmsDeliveryReceipt", 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->notifySmsDeliveryReceipt(soap_tmp___ns1__notifySmsDeliveryReceipt.ns2__notifySmsDeliveryReceipt_, &ns2__notifySmsDeliveryReceiptResponse_); if (soap->error) return soap->error; soap_serializeheader(soap); ns2__notifySmsDeliveryReceiptResponse_.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__notifySmsDeliveryReceiptResponse_.soap_put(soap, "ns2:notifySmsDeliveryReceiptResponse", "") || 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__notifySmsDeliveryReceiptResponse_.soap_put(soap, "ns2:notifySmsDeliveryReceiptResponse", "") || soap_body_end_out(soap) || soap_envelope_end_out(soap) || soap_end_send(soap)) return soap->error; return soap_closesock(soap); } } // namespace ISAGSMS /* End of server object code */