[Soap-Python] soaplib bug in output headers WSDL description

antoine.humbert at free.fr antoine.humbert at free.fr
Fri Jul 15 16:00:43 CEST 2011


Hello,

when defining an output header to a service, the WSDL produced by the server is incorrect : the type description for out header is the same as the input header one.

The problem is in the add_bindings_for_methods of the DefinitionBase class in service.py : seems to be a bad copy/paste of code :

            if not (method.is_async or method.is_callback):
                output = etree.SubElement(operation, '{%s}output' % ns_wsdl)
                output.set('name', method.out_message.get_type_name())

                soap_body = etree.SubElement(output, '{%s}body' % ns_soap)
                soap_body.set('use', 'literal')

                # get input soap header
                out_header = method.in_header
                if out_header is None:
                    out_header = self.__in_header__

should be replaced by
            if not (method.is_async or method.is_callback):
                output = etree.SubElement(operation, '{%s}output' % ns_wsdl)
                output.set('name', method.out_message.get_type_name())

                soap_body = etree.SubElement(output, '{%s}body' % ns_soap)
                soap_body.set('use', 'literal')

                # get output soap header
                out_header = method.out_header
                if out_header is None:
                    out_header = self.__out_header__

Regards,

Antoine HUMBERT


More information about the Soap mailing list