コード例 #1
0
ファイル: Message.asmx.cs プロジェクト: waservice/standardapi
        public MessageSendResponse MessageSend(MessageSendRequest request)
        {
            MessageSendResponse response = new MessageSendResponse();

            try
            {
                //Request body-header object validation
                response.Errors = GetErrorDataListFromRequestTransactionHeader(request.TransactionHeader);
                if (response.Errors != null)
                {
                    response.TransactionHeader = new Data.v2.Common.Common.TransactionHeader();
                    return response;
                }
                response.Errors = GetErrorDataListFromRequest(request.MessageSend);
                if (response.Errors != null)
                {
                    response.TransactionHeader = request.TransactionHeader;
                    return response;
                }

                using (Message_Biz biz = new Message_Biz())
                {
                    response = biz.MessageSend(request);
                }
            }
            catch (Exception ex)
            {
                response.Errors = GetErrorDataListFromException(ex);
                WA.Standard.IF.Logger.Log.Log.RootLogger.ErrorFormat("MessageSendResponse Error {0}: ", ex);
            }

            return response;
        }
コード例 #2
0
ファイル: Message.asmx.cs プロジェクト: waservice/HMCIS
        public MessageSendResponse MessageSend(MessageSendRequest request)
        {
            MessageSendResponse response = new MessageSendResponse();

            try
            {
                WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA MessageSendRequest XML", request);

                //Request body-header object validation
                response.Errors = GetErrorDataListFromRequestTransactionHeader(request.TransactionHeader);
                if (response.Errors != null)
                {
                    response.TransactionHeader = new Data.v2.Common.Common.TransactionHeader();
                }
                response.Errors = GetErrorDataListFromRequest(request.MessageSend);
                if (response.Errors != null)
                {
                    response.TransactionHeader = request.TransactionHeader;
                }

                if (response.Errors == null)
                {
                    using (Message_Biz biz = new Message_Biz())
                    {
                        response = biz.MessageSend(request);
                    }

                    WA.Standard.IF.Logger.Log.Log.SaveXMLLog(0, request.TransactionHeader.DealerID, "WA MessageSendResponse XML", response);
                }
            }
            catch (Exception ex)
            {
                response.Errors = GetErrorDataListFromException(ex);
                WA.Standard.IF.Logger.Log.Log.SaveErrorLog(null, "MessageSend", request, ex.Message, ex);
            }

            return response;
        }