/* soapClient.c
   Generated by gSOAP 2.7.8c from AgentDevice.h
   Copyright (C) 2000-2006, Robert van Engelen, Genivia Inc. All Rights Reserved.
   This part of the software is released under one of the following licenses:
   GPL, the gSOAP public license, or Genivia's license for commercial use.
*/
#include "soapH.h"
#ifdef __cplusplus
extern "C" {
#endif

SOAP_SOURCE_STAMP("@(#) soapClient.c ver 2.7.8c 2007-12-19 20:19:45 GMT")


SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__exchangeData(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_HWID, int _Boot_USCOREtick, int _certKind, char *_ip, char *_dns, char *_wins, char *_gateway, char *_proxy, char *_localTime, struct xsd__base64Binary *_exchangeDataReturn)
{	struct ns1__exchangeData soap_tmp_ns1__exchangeData;
	struct ns1__exchangeDataResponse *soap_tmp_ns1__exchangeDataResponse;
	if (!soap_endpoint)
		soap_endpoint = "http://localhost/axis/services/AgentDevice";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__exchangeData._HWID = _HWID;
	soap_tmp_ns1__exchangeData._Boot_USCOREtick = _Boot_USCOREtick;
	soap_tmp_ns1__exchangeData._certKind = _certKind;
	soap_tmp_ns1__exchangeData._ip = _ip;
	soap_tmp_ns1__exchangeData._dns = _dns;
	soap_tmp_ns1__exchangeData._wins = _wins;
	soap_tmp_ns1__exchangeData._gateway = _gateway;
	soap_tmp_ns1__exchangeData._proxy = _proxy;
	soap_tmp_ns1__exchangeData._localTime = _localTime;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__exchangeData(soap, &soap_tmp_ns1__exchangeData);
	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__exchangeData(soap, &soap_tmp_ns1__exchangeData, "ns1:exchangeData", "")
		 || 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_endpoint, soap_action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_ns1__exchangeData(soap, &soap_tmp_ns1__exchangeData, "ns1:exchangeData", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_xsd__base64Binary(soap, _exchangeDataReturn);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_tmp_ns1__exchangeDataResponse = soap_get_ns1__exchangeDataResponse(soap, NULL, "ns1:exchangeDataResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	if (_exchangeDataReturn && soap_tmp_ns1__exchangeDataResponse->_exchangeDataReturn)
		*_exchangeDataReturn = *soap_tmp_ns1__exchangeDataResponse->_exchangeDataReturn;
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__exchangeDataHttp(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_HWID, int _agentBT, int _packageTpye, char *_ip, char *_dns, char *_wins, char *_gateway, char *_proxy, char *_localTime, char *_deviceID, struct xsd__base64Binary *_exchangeDataHttpReturn)
{	struct ns1__exchangeDataHttp soap_tmp_ns1__exchangeDataHttp;
	struct ns1__exchangeDataHttpResponse *soap_tmp_ns1__exchangeDataHttpResponse;
	if (!soap_endpoint)
		soap_endpoint = "http://localhost/axis/services/AgentDevice";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__exchangeDataHttp._HWID = _HWID;
	soap_tmp_ns1__exchangeDataHttp._agentBT = _agentBT;
	soap_tmp_ns1__exchangeDataHttp._packageTpye = _packageTpye;
	soap_tmp_ns1__exchangeDataHttp._ip = _ip;
	soap_tmp_ns1__exchangeDataHttp._dns = _dns;
	soap_tmp_ns1__exchangeDataHttp._wins = _wins;
	soap_tmp_ns1__exchangeDataHttp._gateway = _gateway;
	soap_tmp_ns1__exchangeDataHttp._proxy = _proxy;
	soap_tmp_ns1__exchangeDataHttp._localTime = _localTime;
	soap_tmp_ns1__exchangeDataHttp._deviceID = _deviceID;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__exchangeDataHttp(soap, &soap_tmp_ns1__exchangeDataHttp);
	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__exchangeDataHttp(soap, &soap_tmp_ns1__exchangeDataHttp, "ns1:exchangeDataHttp", "")
		 || 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_endpoint, soap_action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_ns1__exchangeDataHttp(soap, &soap_tmp_ns1__exchangeDataHttp, "ns1:exchangeDataHttp", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_xsd__base64Binary(soap, _exchangeDataHttpReturn);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_tmp_ns1__exchangeDataHttpResponse = soap_get_ns1__exchangeDataHttpResponse(soap, NULL, "ns1:exchangeDataHttpResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	if (_exchangeDataHttpReturn && soap_tmp_ns1__exchangeDataHttpResponse->_exchangeDataHttpReturn)
		*_exchangeDataHttpReturn = *soap_tmp_ns1__exchangeDataHttpResponse->_exchangeDataHttpReturn;
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__exchangeDataEx(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_HWID, int _Boot_USCOREtick, int _certKind, char *_ip, char *_dns, char *_wins, char *_gateway, char *_proxy, char *_localTime, char *_deviceID, struct xsd__base64Binary *_exchangeDataExReturn)
{	struct ns1__exchangeDataEx soap_tmp_ns1__exchangeDataEx;
	struct ns1__exchangeDataExResponse *soap_tmp_ns1__exchangeDataExResponse;
	if (!soap_endpoint)
		soap_endpoint = "http://localhost/axis/services/AgentDevice";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__exchangeDataEx._HWID = _HWID;
	soap_tmp_ns1__exchangeDataEx._Boot_USCOREtick = _Boot_USCOREtick;
	soap_tmp_ns1__exchangeDataEx._certKind = _certKind;
	soap_tmp_ns1__exchangeDataEx._ip = _ip;
	soap_tmp_ns1__exchangeDataEx._dns = _dns;
	soap_tmp_ns1__exchangeDataEx._wins = _wins;
	soap_tmp_ns1__exchangeDataEx._gateway = _gateway;
	soap_tmp_ns1__exchangeDataEx._proxy = _proxy;
	soap_tmp_ns1__exchangeDataEx._localTime = _localTime;
	soap_tmp_ns1__exchangeDataEx._deviceID = _deviceID;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__exchangeDataEx(soap, &soap_tmp_ns1__exchangeDataEx);
	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__exchangeDataEx(soap, &soap_tmp_ns1__exchangeDataEx, "ns1:exchangeDataEx", "")
		 || 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_endpoint, soap_action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_ns1__exchangeDataEx(soap, &soap_tmp_ns1__exchangeDataEx, "ns1:exchangeDataEx", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_xsd__base64Binary(soap, _exchangeDataExReturn);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_tmp_ns1__exchangeDataExResponse = soap_get_ns1__exchangeDataExResponse(soap, NULL, "ns1:exchangeDataExResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	if (_exchangeDataExReturn && soap_tmp_ns1__exchangeDataExResponse->_exchangeDataExReturn)
		*_exchangeDataExReturn = *soap_tmp_ns1__exchangeDataExResponse->_exchangeDataExReturn;
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__UpdateResult(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_HWID, int _state, struct ns1__UpdateResultResponse *_param_1)
{	struct ns1__UpdateResult soap_tmp_ns1__UpdateResult;
	if (!soap_endpoint)
		soap_endpoint = "http://localhost/axis/services/AgentDevice";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__UpdateResult._HWID = _HWID;
	soap_tmp_ns1__UpdateResult._state = _state;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__UpdateResult(soap, &soap_tmp_ns1__UpdateResult);
	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__UpdateResult(soap, &soap_tmp_ns1__UpdateResult, "ns1:UpdateResult", "")
		 || 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_endpoint, soap_action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_ns1__UpdateResult(soap, &soap_tmp_ns1__UpdateResult, "ns1:UpdateResult", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	soap_default_ns1__UpdateResultResponse(soap, _param_1);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	soap_get_ns1__UpdateResultResponse(soap, _param_1, "ns1:UpdateResultResponse", "");
	if (soap->error)
	{	if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
			return soap_recv_fault(soap);
		return soap_closesock(soap);
	}
	if (soap_body_end_in(soap)
	 || soap_envelope_end_in(soap)
	 || soap_end_recv(soap))
		return soap_closesock(soap);
	return soap_closesock(soap);
}

#ifdef __cplusplus
}
#endif

/* End of soapClient.c */
