/* soapClient.c
   Generated by gSOAP 2.7.9e from src/jasperserver/soap/js.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.9e 2007-04-12 23:21:11 GMT")


SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__put(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_requestXmlString, char **_putReturn)
{	struct ns1__put soap_tmp_ns1__put;
	struct ns1__putResponse *soap_tmp_ns1__putResponse;
	if (!soap_endpoint)
		soap_endpoint = "http://127.0.0.1:8080/jasperserver/services/repository";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__put._requestXmlString = _requestXmlString;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__put(soap, &soap_tmp_ns1__put);
	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__put(soap, &soap_tmp_ns1__put, "ns1:put", "")
		 || 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__put(soap, &soap_tmp_ns1__put, "ns1:put", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	*_putReturn = NULL;
	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__putResponse = soap_get_ns1__putResponse(soap, NULL, "ns1:putResponse", "");
	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 (_putReturn && soap_tmp_ns1__putResponse->_putReturn)
		*_putReturn = *soap_tmp_ns1__putResponse->_putReturn;
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__get(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_requestXmlString, char **_getReturn)
{	struct ns1__get soap_tmp_ns1__get;
	struct ns1__getResponse *soap_tmp_ns1__getResponse;
	if (!soap_endpoint)
		soap_endpoint = "http://127.0.0.1:8080/jasperserver/services/repository";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__get._requestXmlString = _requestXmlString;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__get(soap, &soap_tmp_ns1__get);
	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__get(soap, &soap_tmp_ns1__get, "ns1:get", "")
		 || 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__get(soap, &soap_tmp_ns1__get, "ns1:get", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	*_getReturn = NULL;
	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__getResponse = soap_get_ns1__getResponse(soap, NULL, "ns1:getResponse", "");
	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 (_getReturn && soap_tmp_ns1__getResponse->_getReturn)
		*_getReturn = *soap_tmp_ns1__getResponse->_getReturn;
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__list(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_requestXmlString, char **_listReturn)
{	struct ns1__list soap_tmp_ns1__list;
	struct ns1__listResponse *soap_tmp_ns1__listResponse;
	if (!soap_endpoint)
		soap_endpoint = "http://127.0.0.1:8080/jasperserver/services/repository";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__list._requestXmlString = _requestXmlString;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__list(soap, &soap_tmp_ns1__list);
	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__list(soap, &soap_tmp_ns1__list, "ns1:list", "")
		 || 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__list(soap, &soap_tmp_ns1__list, "ns1:list", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	*_listReturn = NULL;
	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__listResponse = soap_get_ns1__listResponse(soap, NULL, "ns1:listResponse", "");
	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 (_listReturn && soap_tmp_ns1__listResponse->_listReturn)
		*_listReturn = *soap_tmp_ns1__listResponse->_listReturn;
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__delete(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_requestXmlString, char **_deleteReturn)
{	struct ns1__delete soap_tmp_ns1__delete;
	struct ns1__deleteResponse *soap_tmp_ns1__deleteResponse;
	if (!soap_endpoint)
		soap_endpoint = "http://127.0.0.1:8080/jasperserver/services/repository";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__delete._requestXmlString = _requestXmlString;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__delete(soap, &soap_tmp_ns1__delete);
	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__delete(soap, &soap_tmp_ns1__delete, "ns1:delete", "")
		 || 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__delete(soap, &soap_tmp_ns1__delete, "ns1:delete", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	*_deleteReturn = NULL;
	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__deleteResponse = soap_get_ns1__deleteResponse(soap, NULL, "ns1:deleteResponse", "");
	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 (_deleteReturn && soap_tmp_ns1__deleteResponse->_deleteReturn)
		*_deleteReturn = *soap_tmp_ns1__deleteResponse->_deleteReturn;
	return soap_closesock(soap);
}

SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns1__runReport(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *_requestXmlString, char **_runReportReturn)
{	struct ns1__runReport soap_tmp_ns1__runReport;
	struct ns1__runReportResponse *soap_tmp_ns1__runReportResponse;
	if (!soap_endpoint)
		soap_endpoint = "http://127.0.0.1:8080/jasperserver/services/repository";
	if (!soap_action)
		soap_action = "";
	soap->encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/";
	soap_tmp_ns1__runReport._requestXmlString = _requestXmlString;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns1__runReport(soap, &soap_tmp_ns1__runReport);
	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__runReport(soap, &soap_tmp_ns1__runReport, "ns1:runReport", "")
		 || 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__runReport(soap, &soap_tmp_ns1__runReport, "ns1:runReport", "")
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	*_runReportReturn = NULL;
	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__runReportResponse = soap_get_ns1__runReportResponse(soap, NULL, "ns1:runReportResponse", "");
	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 (_runReportReturn && soap_tmp_ns1__runReportResponse->_runReportReturn)
		*_runReportReturn = *soap_tmp_ns1__runReportResponse->_runReportReturn;
	return soap_closesock(soap);
}

#ifdef __cplusplus
}
#endif

/* End of soapClient.c */
