private bool HandleJSUPWSResponse(JSUPReplyType replydata, int transferNumber)
        {
            bool transferWebService = false;

            if (replydata.serviceInformation != null)
            {
                //check whether there is a general exception
                if (replydata.serviceInformation.status != null &&
                    replydata.serviceInformation.status.exceptionCode != null)
                {
                    ErrorMessage = replydata.serviceInformation.status.exceptionCode.ToString() +
                                   replydata.serviceInformation.status.sourceMessage;
                    FileLogger.Instance.logMessage(LogLevel.ERROR, this, "Transfer web service came back with errors for" + transferNumber
                                                   + replydata.serviceInformation.status.exceptionCode.ToString() +
                                                   replydata.serviceInformation.status.sourceMessage);
                    //return false;
                }

                if (replydata.serviceData != null && replydata.serviceData.Items != null)
                {
                    if (replydata.serviceData.Items[0].GetType() != typeof(businessExceptionType))
                    {
                        //check the reply
                        transferWebService = true;
                    }
                    else
                    {
                        transferWebService = false;
                        businessExceptionType returnData = (businessExceptionType)replydata.serviceData.Items[0];
                        ErrorMessage = returnData.responseCode.ToString() +
                                       returnData.message;

                        FileLogger.Instance.logMessage(LogLevel.ERROR, this, "Transfer web service returned with business exception " + transferNumber + " " +
                                                       returnData.responseCode.ToString() +
                                                       returnData.message);
                    }
                }
                else
                //No data came back from the web service call...log it
                {
                    transferWebService = true;
                    FileLogger.Instance.logMessage(LogLevel.ERROR, this, "Transfer JSUP web service No data returned for" + transferNumber);
                }
            }
            return(transferWebService);
        }
        private bool HandleTransInRejectWSRespose(TransferService.RJReplyType replydata, out string errorMessage, string transNumber)
        {
            bool transferWebService = false;

            if (replydata.serviceInformation != null)
            {
                //check whether there is a general exception
                if (replydata.serviceInformation.status != null &&
                    replydata.serviceInformation.status.exceptionCode != null)
                {
                    ErrorMessage = replydata.serviceInformation.status.exceptionCode.ToString() +
                                   replydata.serviceInformation.status.sourceMessage;
                    FileLogger.Instance.logMessage(LogLevel.ERROR, this, "Transfer IN Reject web service came back with errors for" + transNumber
                                                   + replydata.serviceInformation.status.exceptionCode.ToString() +
                                                   replydata.serviceInformation.status.sourceMessage);
                }

                if (replydata.serviceData != null && replydata.serviceData.Items != null)
                {
                    if (replydata.serviceData.Items[0].GetType() != typeof(businessExceptionType))
                    {
                        //check the reply
                        transferWebService = true;
                    }
                    else
                    {
                        businessExceptionType returnData = (businessExceptionType)replydata.serviceData.Items[0];
                        ErrorMessage = returnData.responseCode.ToString() +
                                       returnData.message;
                        FileLogger.Instance.logMessage(LogLevel.ERROR, this, "Transfer IN Reject web service came back with errors for" + transNumber + " " +
                                                       returnData.responseCode.ToString() +
                                                       returnData.message);
                        transferWebService = false;
                    }
                }
                else
                //No data came back from the web service call...log it
                {
                    transferWebService = true;
                    FileLogger.Instance.logMessage(LogLevel.ERROR, this, "Transfer IN Reject web service did not return any data for" + transNumber);
                }
            }
            errorMessage = ErrorMessage;
            return(transferWebService);
        }