[Soap-Python] XMLAttribute ignored in ClassModelBase.from_xml()

Burak Arslan burak.arslan at arskom.com.tr
Thu Jul 28 10:32:05 CEST 2011


On 07/27/11 20:15, Tsah Zelenka wrote:
> Hello,
>
> It seem that if a complexType is send to soaplib its attributes are not
> processed. In from_xml(), the method has a main loop itering over
> the xml element's childrens and ignore the attributes. Here is a small
> fix, with limited support for integer/long attributes :
> https://github.com/tzelen/soaplib/commit/2e7baa903091a3e59e17ed7d7cca797636f85640

Hi Tsah,

Thank you for submitting this patch. However, I can't accept it as it is
for two reasons: First, you should provide us with a test case. And
second, you should do something along the lines of this:

    inst.Attributes.attr =
cls.Attributes.attr.from_string(elt.attrs['attr'])
    # (where cls is the class definition, inst its instance and elt
    # is the correspondng lxml.etree._Element instance)

instead of using if's to test for variable types.

That said, if you could provide us just with the test case, I can fix
this bug in a way that'd please everybody.

Best Regards,
Burak



More information about the Soap mailing list