示例#1
0
        /// <summary>
        /// Coordinates all requests and responses with SAP required to call a function, set parameters and retrieve the response
        /// </summary>
        /// <param name="function"></param>
        public void ProcessSAPFunction(SAPFunction function)
        {
            Logger.Instance.Log.Trace("ProcessSAPFunction method");

            //LogParameters(function.InputParameters, "Before preparing input.");

            RfcRepository repo = Destination.Repository;
            RfcFunctionMetadata meta = repo.GetFunctionMetadata(function.getName());
            IRfcFunction rfc = meta.CreateFunction();

            PrepareInputParameters(function, meta, rfc);

            //LogParameters(function.InputParameters, "After input has been prepared.");

            PrepareOutputParameters(function, meta, rfc);
            InvokeSAP(function, rfc);
            ProcessResults(function, meta, rfc);
        }
示例#2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="ex"></param>
 /// <param name="function"></param>
 private void LogException(Exception ex, SAPFunction function)
 {
     Logger.Instance.Log.LogException(NLog.LogLevel.Error, String.Format("Function Name: {0}", function.getName()), ex);
 }