WSCPE confirmar arribo
REM confirmararriboCPE instalador 99 o superior
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit", "certificado pfx tramitado en AFIP", "") Then
REM ATENCION, ejecutar este método necesario para que la interfaz capture el trafico hacia y desde el servidor antes que el sistema operativo.
REM servidor WS CPE usa un formato incompatible y debe ser transformado para operar normalmente.
If fe.registrarTrafico(True) Then
Else
MsgBox("error capturar trafico " + fe.UltimoMensajeError)
End If
REM fe.cpeversion = 0 / fe.cpeversion = 1
fe.ArchivoXMLEnviado = "d:\aenvio.xml"
fe.ArchivoXMLRecibido = "d:\arecibo.xml"
fe.ArchivoCertificadoPassword = ""
If fe.cpeObtenerTicketAcceso() Then
bResultado = bResultado And fe.cpeCargarPropiedad("LIMPIAR", "", 0, 0)
bResultado = bResultado And fe.cpeCargarPropiedad("confirmararribo.cuitSolicitante", "2011111112", 0, 0)
bResultado = bResultado And fe.cpeCargarPropiedad("confirmararribo.nroOrden", "1", 0, 0)
bResultado = bResultado And fe.cpeCargarPropiedad("confirmararribo.sucursal", "1", 0, 0)
bResultado = bResultado And fe.cpeCargarPropiedad("confirmararribo.tipoCPE", "74", 0, 0)
If bresultado Then
bresultado = fe.cpeConfirmarArribo()
If fe.UltimoMensajeError = "" And fe.cpeErrorDescripcion1 = "" Then
MsgBox("nro " + fe.cpeLeerPropiedad("cartaporte", "cabecera.nroCTG", "", 0, 0))
MsgBox("estado " + fe.cpeLeerPropiedad("cartaporte", "cabecera.estado", "", 0, 0))
MsgBox("PDF " + fe.cpeLeerPropiedad("cartaporte", "PDF", "d:\comprobante.pdf", 0, 0))
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error ller servidor " + fe.cpeErrorDescripcion1)
End If
Else
MsgBox("fallo cargar propiedad " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo acceso " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo iniciar " + fe.UltimoMensajeError)
End If