17 lines
552 B
Python
17 lines
552 B
Python
def soap_error(soap_response): # Testeado
|
|
"""
|
|
Verifica si la respuesta SOAP no contiene errores.
|
|
|
|
Args:
|
|
soap_response: Respuesta del servicio SOAP
|
|
|
|
Returns:
|
|
bool: True si no hay errores, False en caso contrario
|
|
"""
|
|
if '<ns2:tieneError>true</ns2:tieneError>' in soap_response.text:
|
|
return True
|
|
if '<ns3:tieneError>true</ns3:tieneError>' in soap_response.text:
|
|
return True
|
|
|
|
# Aquí podrías agregar más lógica para verificar errores específicos en el XML
|
|
return False |