I'm trying get error detail, when I'm calling soap service with zeep.
How parse zeep.exceptions.Fault.detail? It's return lxml.etree._Element.
I'm using this code:
try:
client = Client(wsdl=self.__wsdl)
response = client.service.CustomerInformation(CustomerInformationService=self.service, faultStyle='wsdl')
except Fault as error:
detail = error.detail
# parse detail here
Here is response XML:
<?xml version="1.0" ?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body >
<soap-env:Fault >
<faultcode>soap-env:Client</faultcode>
<faultstring>Client Error</faultstring>
<detail>
<ouaf:Fault xmlns:ouaf="urn:oracle:ouaf">
<ResponseStatus>F</ResponseStatus>
<ResponseCode>2013</ResponseCode>
<ResponseText>
Error while executing the request:
(Server Message)
Category: 90006
Number: 32200
Call Sequence:
Program Name: CustomerInformationService
Text: The personal account was not found: 9134211141
Description:
Table: null
Field: null
</ResponseText>
<ResponseData numParm="1" text="The personal account was not found: 9134211141" category="90006" number="32200" parm1="9134211141" />
</ouaf:Fault>
</detail>
</soap-env:Fault>
</soap-env:Body >
</soap-env:Envelope>
Diffinition of 'Fault' type from xml data exist in my wsdl.