public string ProcesarRespuestaAceptacionRechazo(string RfcReceptor, string fecha, string rfcPac, List <SolicitudAceptacionRechazoFolios> F, SAT.CFDI.Cliente.Procesamiento.ServicioAceptacionRechazo.SignatureType asig) { string result; try { AceptacionRechazoServiceClient CFDI = new AceptacionRechazoServiceClient(); AcuseAceptacionRechazo A = new AcuseAceptacionRechazo(); HttpRequestMessageProperty tokenAutenticacion = this.AutenticaServicio(); using (new OperationContextScope(CFDI.InnerChannel)) { OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = tokenAutenticacion; A = CFDI.ProcesarRespuesta(new SolicitudAceptacionRechazo { Fecha = Convert.ToDateTime(fecha), RfcPacEnviaSolicitud = rfcPac, RfcReceptor = RfcReceptor, Signature = asig, Folios = F.ToArray() }); result = AccesoServicios.GetXMLFromObject(A); } } catch (Exception exception) { AccesoServicios.Log.Error("(Envio) Error al enviar los CFDI's " + exception.ToString()); result = null; } return(result); }
public string ConsultaAceptacionRechazo(string RfcReceptor) { string result; try { AceptacionRechazoServiceClient CFDI = new AceptacionRechazoServiceClient(); HttpRequestMessageProperty tokenAutenticacion = this.AutenticaServicio(); using (new OperationContextScope(CFDI.InnerChannel)) { OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = tokenAutenticacion; AcusePeticionesPendientes x = CFDI.ObtenerPeticionesPendientes(RfcReceptor); string xml = AccesoServicios.GetXMLFromObject(x); result = xml; } } catch (Exception exception) { AccesoServicios.Log.Error("(Consultar) Error al consultar los CFDI's " + exception.ToString()); result = null; } return(result); }