public static void LedorVadorServiceASMXTestUnit() { List <LedorVadorFlowPackage> packages = new List <LedorVadorFlowPackage>(); packages.Add(new LedorVadorFlowPackage() { histClinica = Convert.ToInt32(ConfigurationManager.AppSettings.Get("HistClinica")), razonSocial = ConfigurationManager.AppSettings.Get("RazonSocial"), empresaPropia = Convert.ToInt32(ConfigurationManager.AppSettings.Get("EmpresaID_Propia")), documento_externId = ConfigurationManager.AppSettings.Get("Documento_ExternID"), establecimiento_numero = ConfigurationManager.AppSettings.Get("Establecimiento_Numero"), documento_numero = ConfigurationManager.AppSettings.Get("Documento_Numero"), fecha = DateTime.Now, observacion = ConfigurationManager.AppSettings.Get("Observacion"), tipoServicioId = Convert.ToInt32(ConfigurationManager.AppSettings.Get("TipoServicioID")), tipoImpuestoId_Iva = Convert.ToInt32(ConfigurationManager.AppSettings.Get("TipoImpuestoID_IVA")), cantidad = Convert.ToDouble(ConfigurationManager.AppSettings.Get("Cantidad")), importeUnitario = Convert.ToDouble(ConfigurationManager.AppSettings.Get("ImporteUnitario")) }); LedorVadorRequest request = new LedorVadorRequest() { login = ConfigurationManager.AppSettings.Get("login"), password = ConfigurationManager.AppSettings.Get("pass"), packages = packages.ToArray() }; SendPackagesRequest req = new SendPackagesRequest() { Body = new SendPackagesRequestBody(request) }; try { LVASMX_SMG01.LVServiceSoapClient client = new LVServiceSoapClient(); SendPackagesResponse resp = client.SendPackages(req); LedorVadorResponse response = resp.Body.SendPackagesResult; Console.WriteLine(response.responseMessage); } catch (Exception e) { Console.WriteLine("[LedorVadorFlowService TestUnit Exception][Posible EnpointAdress nulo][" + e.ToString().Substring(0, 300) + "]"); } Console.ReadKey(); }
public static void LedorVadorServiceASMXTestUnit() { List<LedorVadorFlowPackage> packages = new List<LedorVadorFlowPackage>(); packages.Add(new LedorVadorFlowPackage() { histClinica = Convert.ToInt32(ConfigurationManager.AppSettings.Get("HistClinica")), razonSocial = ConfigurationManager.AppSettings.Get("RazonSocial"), empresaPropia = Convert.ToInt32(ConfigurationManager.AppSettings.Get("EmpresaID_Propia")), documento_externId = ConfigurationManager.AppSettings.Get("Documento_ExternID"), establecimiento_numero = ConfigurationManager.AppSettings.Get("Establecimiento_Numero"), documento_numero = ConfigurationManager.AppSettings.Get("Documento_Numero"), fecha = DateTime.Now, observacion = ConfigurationManager.AppSettings.Get("Observacion"), tipoServicioId = Convert.ToInt32(ConfigurationManager.AppSettings.Get("TipoServicioID")), tipoImpuestoId_Iva = Convert.ToInt32(ConfigurationManager.AppSettings.Get("TipoImpuestoID_IVA")), cantidad = Convert.ToDouble(ConfigurationManager.AppSettings.Get("Cantidad")), importeUnitario = Convert.ToDouble(ConfigurationManager.AppSettings.Get("ImporteUnitario")) }); LedorVadorRequest request = new LedorVadorRequest() { login = ConfigurationManager.AppSettings.Get("login"), password = ConfigurationManager.AppSettings.Get("pass"), packages = packages.ToArray() }; SendPackagesRequest req = new SendPackagesRequest() { Body = new SendPackagesRequestBody(request) }; try { LVASMX_SMG01.LVServiceSoapClient client = new LVServiceSoapClient(); SendPackagesResponse resp = client.SendPackages(req); LedorVadorResponse response = resp.Body.SendPackagesResult; Console.WriteLine(response.responseMessage); } catch (Exception e) { Console.WriteLine("[LedorVadorFlowService TestUnit Exception][Posible EnpointAdress nulo][" + e.ToString().Substring(0, 300) + "]"); } Console.ReadKey(); }