fix: nuevos ajustes en enpoints para guardar las petciones a vu
This commit is contained in:
@@ -38,6 +38,28 @@ async def obtener_edoc(**kwargs):
|
||||
'SOAPAction': 'http://tempuri.org/IServicioEdocument/GetDocumento'
|
||||
}
|
||||
soap_xml = edocs_vu_controller.generate_edocument_template(username=usuario, password=password, idEDocument=numero_documento)
|
||||
|
||||
# Enviar documento a EFC
|
||||
try:
|
||||
pedimento_efc = kwargs.get('pedimento', {})
|
||||
pedimento_app = pedimento_efc.get('pedimento_app', 'N/A')
|
||||
organizacion_efc = pedimento_efc.get('organizacion', None)
|
||||
pedimento_id_efc = pedimento_efc.get("id", None)
|
||||
|
||||
file_name_request = f"VU_ED_{pedimento_app}_{numero_documento}_REQUEST.xml"
|
||||
|
||||
document_response = await edocs_rest_controller.post_document(
|
||||
soap_response=soap_xml,
|
||||
organizacion=organizacion_efc,
|
||||
pedimento=pedimento_id_efc,
|
||||
file_name=file_name_request,
|
||||
document_type=21 # Tipo de documento para request de e-document,
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error al enviar documento request: {e}")
|
||||
|
||||
|
||||
response = await edocs_vu_controller.make_request_async(
|
||||
"Ventanilla-HA/ServicioEdocument/ServicioEdocument.svc",
|
||||
data=soap_xml,
|
||||
|
||||
Reference in New Issue
Block a user