Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ActionsCommHelper
- {
- internal static bool Send(FASR.OperationCall[] ocall, string transactionid, out string recordid)
- {
- Lift.LiftManager.Logger.Write("ActionsCommHelper", "Entering Send({0}, {1})", ocall.Length.ToString(), transactionid);
- recordid = "";
- bool ret = false;
- if (ocall == null)
- throw new Exception("Operation call array is empty");
- FASR.ExecuteRequest request = new FASR.ExecuteRequest();
- request.OperationCalls = ocall;
- request.ExternalTransactionId = transactionid;
- string serverURL = Lift.LiftManager.ConfigProvider.GetValue("wsdl_url");
- FASR.ExecuteResponse response = Lift.LiftManager.RemoteClient.ExecuteRequest<FASR.IntegrationClient, FASR.ExecuteRequest, FASR.ExecuteResponse>(request,
- new Lift.II.RemoteClientInfo()
- {
- Url = serverURL,
- User = Lift.LiftManager.ConfigProvider.GetValue("wsdl_user"),
- Password = Lift.LiftManager.ConfigProvider.GetValue("wsdl_password")
- }
- );
- if (response.Transaction.Status == FASR.TransactionStatus.SUCCESS)
- {
- ret = true;
- if (response.Transaction.Operations != null && response.Transaction.Operations.Length > 0)
- recordid = response.Transaction.Operations[0].RecordID;
- }
- Lift.LiftManager.Logger.Write("ActionsCommHelper", "Leaving Send({0}, {1})={2}", ocall.Length.ToString(), transactionid, ret.ToString());
- return ret;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement