Commit 6b75c9f8 authored by Gozutok, Recep's avatar Gozutok, Recep
Browse files

Upload New File

parent 3ff5c4d3
/* soapreserveService.cpp
Generated by gSOAP 2.8.28 from Service.h
gSOAP XML Web services tools
Copyright (C) 2000-2016, Robert van Engelen, Genivia Inc. All Rights Reserved.
The soapcpp2 tool and its generated software are released under the GPL.
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
--------------------------------------------------------------------------------
A commercial use license is available from Genivia Inc., contact@genivia.com
--------------------------------------------------------------------------------
*/
#include "soapreserveService.h"
reserveService::reserveService() : soap(SOAP_IO_DEFAULT)
{ reserveService_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
}
reserveService::reserveService(const reserveService& rhs)
{ soap_copy_context(this, &rhs);
}
reserveService::reserveService(const struct soap &_soap) : soap(_soap)
{ }
reserveService::reserveService(soap_mode iomode) : soap(iomode)
{ reserveService_init(iomode, iomode);
}
reserveService::reserveService(soap_mode imode, soap_mode omode) : soap(imode, omode)
{ reserveService_init(imode, omode);
}
reserveService::~reserveService()
{
this->destroy();
}
void reserveService::reserveService_init(soap_mode imode, soap_mode omode)
{ soap_imode(this, imode);
soap_omode(this, omode);
static const struct Namespace namespaces[] =
{
{"SOAP-ENV", "http://www.w3.org/2003/05/soap-envelope", "http://schemas.xmlsoap.org/soap/envelope/", NULL},
{"SOAP-ENC", "http://www.w3.org/2003/05/soap-encoding", "http://schemas.xmlsoap.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", "urn:reserve", NULL, NULL},
{"ns2", "urn://Ocpp/Cs/2012/06/", NULL, NULL},
{"chan", "http://schemas.microsoft.com/ws/2005/02/duplex", NULL, NULL},
{"wsa5", "http://www.w3.org/2005/08/addressing", "http://schemas.xmlsoap.org/ws/2004/08/addressing", NULL},
{NULL, NULL, NULL, NULL}
};
soap_set_namespaces(this, namespaces);
}
void reserveService::destroy()
{ soap_destroy(this);
soap_end(this);
}
void reserveService::reset()
{ this->destroy();
soap_done(this);
soap_initialize(this);
reserveService_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
}
#ifndef WITH_PURE_VIRTUAL
reserveService *reserveService::copy()
{ reserveService *dup = SOAP_NEW_COPY(reserveService(*(struct soap*)this));
return dup;
}
#endif
reserveService& reserveService::operator=(const reserveService& rhs)
{ soap_copy_context(this, &rhs);
return *this;
}
int reserveService::soap_close_socket()
{ return soap_closesock(this);
}
int reserveService::soap_force_close_socket()
{ return soap_force_closesock(this);
}
int reserveService::soap_senderfault(const char *string, const char *detailXML)
{ return ::soap_sender_fault(this, string, detailXML);
}
int reserveService::soap_senderfault(const char *subcodeQName, const char *string, const char *detailXML)
{ return ::soap_sender_fault_subcode(this, subcodeQName, string, detailXML);
}
int reserveService::soap_receiverfault(const char *string, const char *detailXML)
{ return ::soap_receiver_fault(this, string, detailXML);
}
int reserveService::soap_receiverfault(const char *subcodeQName, const char *string, const char *detailXML)
{ return ::soap_receiver_fault_subcode(this, subcodeQName, string, detailXML);
}
void reserveService::soap_print_fault(FILE *fd)
{ ::soap_print_fault(this, fd);
}
#ifndef WITH_LEAN
#ifndef WITH_COMPAT
void reserveService::soap_stream_fault(std::ostream& os)
{ ::soap_stream_fault(this, os);
}
#endif
char *reserveService::soap_sprint_fault(char *buf, size_t len)
{ return ::soap_sprint_fault(this, buf, len);
}
#endif
void reserveService::soap_noheader()
{ this->header = NULL;
}
void reserveService::soap_header(std::string *ns2__chargeBoxIdentity, char *wsa5__MessageID, struct wsa5__RelatesToType *wsa5__RelatesTo, struct wsa5__EndpointReferenceType *wsa5__From, struct wsa5__EndpointReferenceType *wsa5__ReplyTo, struct wsa5__EndpointReferenceType *wsa5__FaultTo, char *wsa5__To, char *wsa5__Action, struct chan__ChannelInstanceType *chan__ChannelInstance)
{ ::soap_header(this);
this->header->ns2__chargeBoxIdentity = ns2__chargeBoxIdentity;
this->header->wsa5__MessageID = wsa5__MessageID;
this->header->wsa5__RelatesTo = wsa5__RelatesTo;
this->header->wsa5__From = wsa5__From;
this->header->wsa5__ReplyTo = wsa5__ReplyTo;
this->header->wsa5__FaultTo = wsa5__FaultTo;
this->header->wsa5__To = wsa5__To;
this->header->wsa5__Action = wsa5__Action;
this->header->chan__ChannelInstance = chan__ChannelInstance;
}
const SOAP_ENV__Header *reserveService::soap_header()
{ return this->header;
}
int reserveService::run(int port)
{ if (!soap_valid_socket(this->master) && !soap_valid_socket(this->bind(NULL, port, 100)))
return this->error;
for (;;)
{ if (!soap_valid_socket(this->accept()))
{ if (this->errnum == 0) // timeout?
this->error = SOAP_OK;
break;
}
if (this->serve())
break;
this->destroy();
}
return this->error;
}
#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS)
int reserveService::ssl_run(int port)
{ if (!soap_valid_socket(this->master) && !soap_valid_socket(this->bind(NULL, port, 100)))
return this->error;
for (;;)
{ if (!soap_valid_socket(this->accept()))
{ if (this->errnum == 0) // timeout?
this->error = SOAP_OK;
break;
}
if (this->ssl_accept() || this->serve())
break;
this->destroy();
}
return this->error;
}
#endif
SOAP_SOCKET reserveService::bind(const char *host, int port, int backlog)
{ return soap_bind(this, host, port, backlog);
}
SOAP_SOCKET reserveService::accept()
{ return soap_accept(this);
}
#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS)
int reserveService::ssl_accept()
{ return soap_ssl_accept(this);
}
#endif
int reserveService::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__ReserveNow(reserveService*);
int reserveService::dispatch()
{
soap_peek_element(this);
if (!soap_match_tag(this, this->tag, "ns1:reserveNowRequest"))
return serve___ns1__ReserveNow(this);
return this->error = SOAP_NO_METHOD;
}
static int serve___ns1__ReserveNow(reserveService *soap)
{ struct __ns1__ReserveNow soap_tmp___ns1__ReserveNow;
ns1__ReserveNowResponse ns1__reserveNowResponse;
ns1__reserveNowResponse.soap_default(soap);
soap_default___ns1__ReserveNow(soap, &soap_tmp___ns1__ReserveNow);
if (!soap_get___ns1__ReserveNow(soap, &soap_tmp___ns1__ReserveNow, "-ns1:ReserveNow", 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->ReserveNow(soap_tmp___ns1__ReserveNow.ns1__reserveNowRequest, ns1__reserveNowResponse);
if (soap->error)
return soap->error;
soap->encodingStyle = NULL;
soap_serializeheader(soap);
ns1__reserveNowResponse.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__reserveNowResponse.soap_put(soap, "ns1:reserveNowResponse", "")
|| 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__reserveNowResponse.soap_put(soap, "ns1:reserveNowResponse", "")
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap->error;
return soap_closesock(soap);
}
/* End of server object code */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment