text: /* soapChallengeServiceSoapBindingProxy.cpp
     Generated by gSOAP 2.8.15 from ChallengeService.h
  
  Copyright(C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved.
  The generated code is released under ONE of the following licenses:
  GPL or 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 <soap/soapChallengeServiceSoapBindingProxy.h>
  
  SOAP_NMAC 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://challenge.entelect.co.za/", NULL, NULL},
  	{NULL, NULL, NULL, NULL}
  };
  
  ChallengeServiceSoapBindingProxy::ChallengeServiceSoapBindingProxy()
  {	this->soap = soap_new();
  	this->own = true;
  	ChallengeServiceSoapBindingProxy_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
  }
  
  ChallengeServiceSoapBindingProxy::ChallengeServiceSoapBindingProxy(struct soap *_soap)
  {	this->soap = _soap;
  	this->own = false;
  	ChallengeServiceSoapBindingProxy_init(_soap->imode, _soap->omode);
  }
  
  ChallengeServiceSoapBindingProxy::ChallengeServiceSoapBindingProxy(const char *url)
  {	this->soap = soap_new();
  	this->own = true;
  	ChallengeServiceSoapBindingProxy_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
  	soap_endpoint = url;
  }
  
  ChallengeServiceSoapBindingProxy::ChallengeServiceSoapBindingProxy(soap_mode iomode)
  {	this->soap = soap_new();
  	this->own = true;
  	ChallengeServiceSoapBindingProxy_init(iomode, iomode);
  }
  
  ChallengeServiceSoapBindingProxy::ChallengeServiceSoapBindingProxy(const char *url, soap_mode iomode)
  {	this->soap = soap_new();
  	this->own = true;
  	ChallengeServiceSoapBindingProxy_init(iomode, iomode);
  	soap_endpoint = url;
  }
  
  ChallengeServiceSoapBindingProxy::ChallengeServiceSoapBindingProxy(soap_mode imode, soap_mode omode)
  {	this->soap = soap_new();
  	this->own = true;
  	ChallengeServiceSoapBindingProxy_init(imode, omode);
  }
  
  ChallengeServiceSoapBindingProxy::~ChallengeServiceSoapBindingProxy()
  {	if (this->own)
  		soap_free(this->soap);
  }
  
  void ChallengeServiceSoapBindingProxy::ChallengeServiceSoapBindingProxy_init(soap_mode imode, soap_mode omode)
  {	soap_imode(this->soap, imode);
  	soap_omode(this->soap, omode);
  	soap_endpoint = NULL;
  	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://challenge.entelect.co.za/", NULL, NULL},
  	{NULL, NULL, NULL, NULL}
  };
  	soap_set_namespaces(this->soap, namespaces);
  }
  
  void ChallengeServiceSoapBindingProxy::destroy()
  {	soap_destroy(this->soap);
  	soap_end(this->soap);
  }
  
  void ChallengeServiceSoapBindingProxy::reset()
  {	destroy();
  	soap_done(this->soap);
  	soap_init(this->soap);
  	ChallengeServiceSoapBindingProxy_init(SOAP_IO_DEFAULT, SOAP_IO_DEFAULT);
  }
  
  void ChallengeServiceSoapBindingProxy::soap_noheader()
  {	this->soap->header = NULL;
  }
  
  const SOAP_ENV__Header *ChallengeServiceSoapBindingProxy::soap_header()
  {	return this->soap->header;
  }
  
  const SOAP_ENV__Fault *ChallengeServiceSoapBindingProxy::soap_fault()
  {	return this->soap->fault;
  }
  
  const char *ChallengeServiceSoapBindingProxy::soap_fault_string()
  {	return *soap_faultstring(this->soap);
  }
  
  const char *ChallengeServiceSoapBindingProxy::soap_fault_detail()
  {	return *soap_faultdetail(this->soap);
  }
  
  int ChallengeServiceSoapBindingProxy::soap_close_socket()
  {	return soap_closesock(this->soap);
  }
  
  int ChallengeServiceSoapBindingProxy::soap_force_close_socket()
  {	return soap_force_closesock(this->soap);
  }
  
  void ChallengeServiceSoapBindingProxy::soap_print_fault(FILE *fd)
  {	::soap_print_fault(this->soap, fd);
  }
  
  #ifndef WITH_LEAN
  #ifndef WITH_COMPAT
  void ChallengeServiceSoapBindingProxy::soap_stream_fault(std::ostream& os)
  {	::soap_stream_fault(this->soap, os);
  }
  #endif
  
  char *ChallengeServiceSoapBindingProxy::soap_sprint_fault(char *buf, size_t len)
  {	return ::soap_sprint_fault(this->soap, buf, len);
  }
  #endif
  
  int ChallengeServiceSoapBindingProxy::getStatus(const char *endpoint, const char *soap_action, ns1__getStatus *ns1__getStatus_, ns1__getStatusResponse *ns1__getStatusResponse_)
  {	struct soap *soap = this->soap;
  	struct __ns1__getStatus soap_tmp___ns1__getStatus;
  	if (endpoint)
  		soap_endpoint = endpoint;
  	if (soap_endpoint == NULL)
  		soap_endpoint = "http://localhost:9090/ChallengePort";
  	if (soap_action == NULL)
  		soap_action = "";
  	soap->encodingStyle = NULL;
  	soap_tmp___ns1__getStatus.ns1__getStatus_ = ns1__getStatus_;
  	soap_begin(soap);
  	soap_set_version(soap, 1); /* SOAP1.1 */
  	soap_serializeheader(soap);
  	soap_serialize___ns1__getStatus(soap, &soap_tmp___ns1__getStatus);
  	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__getStatus(soap, &soap_tmp___ns1__getStatus, "-ns1:getStatus", NULL)
  		 || soap_body_end_out(soap)
  		 || soap_envelope_end_out(soap))
  			 return soap->error;
  	}
  	if (soap_end_count(soap))
  		return soap->error;
  	if (soap_connect(soap, soap_url(soap, soap_endpoint, NULL), soap_action)
  	 || soap_envelope_begin_out(soap)
  	 || soap_putheader(soap)
  	 || soap_body_begin_out(soap)
  	 || soap_put___ns1__getStatus(soap, &soap_tmp___ns1__getStatus, "-ns1:getStatus", NULL)
  	 || soap_body_end_out(soap)
  	 || soap_envelope_end_out(soap)
  	 || soap_end_send(soap))
  		return soap_closesock(soap);
  	if (!ns1__getStatusResponse_)
  		return soap_closesock(soap);
  	ns1__getStatusResponse_->soap_default(soap);
  	if (soap_begin_recv(soap)
  	 || soap_envelope_begin_in(soap)
  	 || soap_recv_header(soap)
  	 || soap_body_begin_in(soap))
  		return soap_closesock(soap);
  	ns1__getStatusResponse_->soap_get(soap, "ns1:getStatusResponse", "ns1:getStatusResponse");
  	if (soap->error)
  		return soap_recv_fault(soap, 0);
  	if (soap_body_end_in(soap)
  	 || soap_envelope_end_in(soap)
  	 || soap_end_recv(soap))
  		return soap_closesock(soap);
  	return soap_closesock(soap);
  }
  
  int ChallengeServiceSoapBindingProxy::setAction(const char *endpoint, const char *soap_action, ns1__setAction *ns1__setAction_, ns1__setActionResponse *ns1__setActionResponse_)
  {	struct soap *soap = this->soap;
  	struct __ns1__setAction soap_tmp___ns1__setAction;
  	if (endpoint)
  		soap_endpoint = endpoint;
  	if (soap_endpoint == NULL)
  		soap_endpoint = "http://localhost:9090/ChallengePort";
  	if (soap_action == NULL)
  		soap_action = "";
  	soap->encodingStyle = NULL;
  	soap_tmp___ns1__setAction.ns1__setAction_ = ns1__setAction_;
  	soap_begin(soap);
  	soap_set_version(soap, 1); /* SOAP1.1 */
  	soap_serializeheader(soap);
  	soap_serialize___ns1__setAction(soap, &soap_tmp___ns1__setAction);
  	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__setAction(soap, &soap_tmp___ns1__setAction, "-ns1:setAction", NULL)
  		 || soap_body_end_out(soap)
  		 || soap_envelope_end_out(soap))
  			 return soap->error;
  	}
  	if (soap_end_count(soap))
  		return soap->error;
  	if (soap_connect(soap, soap_url(soap, soap_endpoint, NULL), soap_action)
  	 || soap_envelope_begin_out(soap)
  	 || soap_putheader(soap)
  	 || soap_body_begin_out(soap)
  	 || soap_put___ns1__setAction(soap, &soap_tmp___ns1__setAction, "-ns1:setAction", NULL)
  	 || soap_body_end_out(soap)
  	 || soap_envelope_end_out(soap)
  	 || soap_end_send(soap))
  		return soap_closesock(soap);
  	if (!ns1__setActionResponse_)
  		return soap_closesock(soap);
  	ns1__setActionResponse_->soap_default(soap);
  	if (soap_begin_recv(soap)
  	 || soap_envelope_begin_in(soap)
  	 || soap_recv_header(soap)
  	 || soap_body_begin_in(soap))
  		return soap_closesock(soap);
  	ns1__setActionResponse_->soap_get(soap, "ns1:setActionResponse", "ns1:setActionResponse");
  	if (soap->error)
  		return soap_recv_fault(soap, 0);
  	if (soap_body_end_in(soap)
  	 || soap_envelope_end_in(soap)
  	 || soap_end_recv(soap))
  		return soap_closesock(soap);
  	return soap_closesock(soap);
  }
  
  int ChallengeServiceSoapBindingProxy::login(const char *endpoint, const char *soap_action, ns1__login *ns1__login_, ns1__loginResponse *ns1__loginResponse_)
  {	struct soap *soap = this->soap;
  	struct __ns1__login soap_tmp___ns1__login;
  	if (endpoint)
  		soap_endpoint = endpoint;
  	if (soap_endpoint == NULL)
  		soap_endpoint = "http://localhost:9090/ChallengePort";
  	if (soap_action == NULL)
  		soap_action = "";
  	soap->encodingStyle = NULL;
  	soap_tmp___ns1__login.ns1__login_ = ns1__login_;
  	soap_begin(soap);
  	soap_set_version(soap, 1); /* SOAP1.1 */
  	soap_serializeheader(soap);
  	soap_serialize___ns1__login(soap, &soap_tmp___ns1__login);
  	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__login(soap, &soap_tmp___ns1__login, "-ns1:login", NULL)
  		 || soap_body_end_out(soap)
  		 || soap_envelope_end_out(soap))
  			 return soap->error;
  	}
  	if (soap_end_count(soap))
  		return soap->error;
  	if (soap_connect(soap, soap_url(soap, soap_endpoint, NULL), soap_action)
  	 || soap_envelope_begin_out(soap)
  	 || soap_putheader(soap)
  	 || soap_body_begin_out(soap)
  	 || soap_put___ns1__login(soap, &soap_tmp___ns1__login, "-ns1:login", NULL)
  	 || soap_body_end_out(soap)
  	 || soap_envelope_end_out(soap)
  	 || soap_end_send(soap))
  		return soap_closesock(soap);
  	if (!ns1__loginResponse_)
  		return soap_closesock(soap);
  	ns1__loginResponse_->soap_default(soap);
  	if (soap_begin_recv(soap)
  	 || soap_envelope_begin_in(soap)
  	 || soap_recv_header(soap)
  	 || soap_body_begin_in(soap))
  		return soap_closesock(soap);
  	ns1__loginResponse_->soap_get(soap, "ns1:loginResponse", "ns1:loginResponse");
  	if (soap->error)
  		return soap_recv_fault(soap, 0);
  	if (soap_body_end_in(soap)
  	 || soap_envelope_end_in(soap)
  	 || soap_end_recv(soap))
  		return soap_closesock(soap);
  	return soap_closesock(soap);
  }
  
  int ChallengeServiceSoapBindingProxy::setActions(const char *endpoint, const char *soap_action, ns1__setActions *ns1__setActions_, ns1__setActionsResponse *ns1__setActionsResponse_)
  {	struct soap *soap = this->soap;
  	struct __ns1__setActions soap_tmp___ns1__setActions;
  	if (endpoint)
  		soap_endpoint = endpoint;
  	if (soap_endpoint == NULL)
  		soap_endpoint = "http://localhost:9090/ChallengePort";
  	if (soap_action == NULL)
  		soap_action = "";
  	soap->encodingStyle = NULL;
  	soap_tmp___ns1__setActions.ns1__setActions_ = ns1__setActions_;
  	soap_begin(soap);
  	soap_set_version(soap, 1); /* SOAP1.1 */
  	soap_serializeheader(soap);
  	soap_serialize___ns1__setActions(soap, &soap_tmp___ns1__setActions);
  	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__setActions(soap, &soap_tmp___ns1__setActions, "-ns1:setActions", NULL)
  		 || soap_body_end_out(soap)
  		 || soap_envelope_end_out(soap))
  			 return soap->error;
  	}
  	if (soap_end_count(soap))
  		return soap->error;
  	if (soap_connect(soap, soap_url(soap, soap_endpoint, NULL), soap_action)
  	 || soap_envelope_begin_out(soap)
  	 || soap_putheader(soap)
  	 || soap_body_begin_out(soap)
  	 || soap_put___ns1__setActions(soap, &soap_tmp___ns1__setActions, "-ns1:setActions", NULL)
  	 || soap_body_end_out(soap)
  	 || soap_envelope_end_out(soap)
  	 || soap_end_send(soap))
  		return soap_closesock(soap);
  	if (!ns1__setActionsResponse_)
  		return soap_closesock(soap);
  	ns1__setActionsResponse_->soap_default(soap);
  	if (soap_begin_recv(soap)
  	 || soap_envelope_begin_in(soap)
  	 || soap_recv_header(soap)
  	 || soap_body_begin_in(soap))
  		return soap_closesock(soap);
  	ns1__setActionsResponse_->soap_get(soap, "ns1:setActionsResponse", "ns1:setActionsResponse");
  	if (soap->error)
  		return soap_recv_fault(soap, 0);
  	if (soap_body_end_in(soap)
  	 || soap_envelope_end_in(soap)
  	 || soap_end_recv(soap))
  		return soap_closesock(soap);
  	return soap_closesock(soap);
  }
  /* End of client proxy code */
  