Suds throwing exception on "type not found"
We are using SUDS v1.1.1 and recently starting getting a "Type not found" exception as the response to a request contains a field not in the wsdl. I tried initializing the client with the strict keyword as follows but the exception is still occurring:
client = Client(spec_path, strict=False, faults=False)
Is there any other way to get suds to ignore the unknown field without throwing an exception please?
Could you provide more details (code) about your issue? I was also wondering if you've tried using a custom plugin to bypass the problem, something like:
class IgnoreUnknownFieldsPlugin(MessagePlugin):
def unmarshalled(self, context):
# Remove unknown elements before SUDS processes them
if hasattr(context.reply, 'children'):
known_elements = [el for el in context.reply.children if el.name in context.reply.__metadata__.sxtype.rawchildren]
context.reply.children = known_elements
client = Client(spec_path, plugins=[IgnoreUnknownFieldsPlugin()], faults=False)