Beispiel #1
0
        private void ShowGetCommandByKsnUI()
        {
            var request = new GetCommandByKSNRequestDto();

            try
            {
                Console.WriteLine("=====================Request building start======================");
                request.CustomerCode          = Read_String_Input("Please enter the CustomerCode:", false);
                request.Username              = Read_String_Input("Please enter the Username:"******"Please enter the Password:"******"Please enter the BillingLabel:", true);
                request.CustomerTransactionId = Read_String_Input("Please enter the CustomerTransactionID:", true);
                request.CommandID             = Read_Int_Input("Please enter the CommandID:");
                request.KSN   = Read_String_Input("Please enter the KSN:", false);
                request.KeyID = Read_Int_Input("Please enter the KeyID:");

                Console.WriteLine("=====================Request building End======================");
                var svc    = _serviceProvider.GetService <ISCRAv2Client>();
                var result = svc.GetCommandByKSN(request).Result;
                if ((result.Response != null) && (result.SoapDetails != null))
                {
                    Console.WriteLine("=====================Response Start======================");
                    Console.WriteLine("Request:");
                    Console.Write(PrettyXml(result.SoapDetails.RequestXml) + "\n");
                    Console.WriteLine("Response:");
                    Console.Write(PrettyXml(result.SoapDetails.ResponseXml) + "\n");
                    Console.WriteLine("=====================Response End======================");
                    Console.WriteLine("=====================Parsed Response Start======================");
                    Console.WriteLine(result.Response.ToString());
                    Console.WriteLine("=====================Parsed Response End======================");
                }
                else
                {
                    Console.WriteLine("Response is null, Please check with input values given and try again");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex.Message.ToString());
            }
        }
Beispiel #2
0
 public async Task <(GetCommandByKSNResponseDto Response, RawSoapDetails SoapDetails)> GetCommandByKSN(GetCommandByKSNRequestDto dto)
 {
     (GetCommandByKSNResponseDto Response, RawSoapDetails SoapDetails)result = (default, default);