python - Use only available SOAP bindings? -


currently using suds python 2.7. open trying different client.

i'm connecting soap service returns different documents fields available depending on document. introspecting service doesn't because list of available fields rather returned on doc doc basis. has led me particularly annoying error handling, looks like:

try:     client.service.something except attributeerror:     pass else:     dosomethingwith(client.service.something) 

for every possible field in wsdl schema.

alternatively, parsing response generate list of available fields doesn't much, because end long list of

if client.service.something not none:     dosomethingwith(client.service.something) 

i suppose parse doc , build list of available fields, , like:

for field in listoffields:     dosomethingwith(field) 

but different things field's contents depending on field is, doesn't much.

is there simple/elegant solution? can't 1 have encountered this.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -