Ejemplo n.º 1
0
SOAP_FMAC5 int SOAP_FMAC6 soap_call_oph__oph_notify(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *oph_notify_data, char *oph_notify_json, long *oph_notify_response)
{	struct oph__oph_notify soap_tmp_oph__oph_notify;
	struct oph__oph_notifyResponse *soap_tmp_oph__oph_notifyResponse;
	if (soap_action == NULL)
		soap_action = "";
	soap_tmp_oph__oph_notify.oph_notify_data = oph_notify_data;
	soap_tmp_oph__oph_notify.oph_notify_json = oph_notify_json;
	soap_begin(soap);
	soap->encodingStyle = NULL;
	soap_serializeheader(soap);
	soap_serialize_oph__oph_notify(soap, &soap_tmp_oph__oph_notify);
	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_oph__oph_notify(soap, &soap_tmp_oph__oph_notify, "oph:oph-notify", 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_oph__oph_notify(soap, &soap_tmp_oph__oph_notify, "oph:oph-notify", NULL)
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	if (!oph_notify_response)
		return soap_closesock(soap);
	soap_default_xsd__int(soap, oph_notify_response);
	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_oph__oph_notifyResponse = soap_get_oph__oph_notifyResponse(soap, NULL, "oph:oph-notifyResponse", NULL);
	if (!soap_tmp_oph__oph_notifyResponse || 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);
	if (oph_notify_response && soap_tmp_oph__oph_notifyResponse->oph_notify_response)
		*oph_notify_response = *soap_tmp_oph__oph_notifyResponse->oph_notify_response;
	return soap_closesock(soap);
}
Ejemplo n.º 2
0
SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__echoInteger(struct soap *soap, const char *soap_endpoint, const char *soap_action, long inputInteger, long &_return)
{	struct ns__echoInteger soap_tmp_ns__echoInteger;
	struct ns__echoIntegerResponse *soap_tmp_ns__echoIntegerResponse;
	soap->encodingStyle = "";
	soap_tmp_ns__echoInteger.inputInteger = inputInteger;
	soap_begin(soap);
	soap_serializeheader(soap);
	soap_serialize_ns__echoInteger(soap, &soap_tmp_ns__echoInteger);
	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_ns__echoInteger(soap, &soap_tmp_ns__echoInteger, "ns:echoInteger", 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_endpoint, soap_action)
	 || soap_envelope_begin_out(soap)
	 || soap_putheader(soap)
	 || soap_body_begin_out(soap)
	 || soap_put_ns__echoInteger(soap, &soap_tmp_ns__echoInteger, "ns:echoInteger", NULL)
	 || soap_body_end_out(soap)
	 || soap_envelope_end_out(soap)
	 || soap_end_send(soap))
		return soap_closesock(soap);
	if (!&_return)
		return soap_closesock(soap);
	soap_default_xsd__int(soap, &_return);
	if (soap_begin_recv(soap)
	 || soap_envelope_begin_in(soap)
	 || soap_recv_header(soap)
	 || soap_body_begin_in(soap))
		return soap_closesock(soap);
	if (soap_recv_fault(soap, 1))
		return soap->error;
	soap_tmp_ns__echoIntegerResponse = soap_get_ns__echoIntegerResponse(soap, NULL, "", "");
	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_tmp_ns__echoIntegerResponse->_return;
	return soap_closesock(soap);
}