-
-
Notifications
You must be signed in to change notification settings - Fork 608
Open
Labels
enhancementrequires/example-scriptPlease provide a standalone script which reproduces your problemPlease provide a standalone script which reproduces your problem
Description
Сonfiguration:
- python == 3.5
- zeep == 1.3.0
Action:
- Create corrcet zeep.Client object
- Call to corrcet SOAP method with not valid data (incorrect format, for example)
- Wrap code above in
try ... except zeep.exceptions.Fault as error: - Get
error.detail
try:
client = Client('http://www.webservicex.net/ConvertSpeed.asmx?WSDL')
client.service.ConvertSpeed( 'Not Correct Data', 'kilometersPerhour', 'milesPerhour')
except Fault as error:
foo = error.detail
Result:
I get lxml.etree._Element that need to be parsed, but I have format description for this object in wsdl (in my case).
Suggestion
Add to Fault class "detail_pased" property that will be stored value like service.Method() format if it possible restore by wsdl's types/elements.
Where detail are builds add something like this:
detail_pased=__tryParse(detail) # None or parsed
burkovae, timHerman, hansingt, mingulov, mnacharov and 3 more
Metadata
Metadata
Assignees
Labels
enhancementrequires/example-scriptPlease provide a standalone script which reproduces your problemPlease provide a standalone script which reproduces your problem