#102 MessageParser_XS does not work well with attributes [patch]


MessageParser_XS at revision 784 does not parse attributes in an element correctly if there is more than one attribute. I have reduced the bug to a minimal example. The appended testscript demonstrates the occuring error. The non-XS Parser behaves as supposed whereas XS makes a mistake within the C-part with list-indexing.

The bug can be solved with this patch:

Index: lib/SOAP/WSDL/Expat/MessageParser_XS.xs

--- lib/SOAP/WSDL/Expat/MessageParser_XS.xs (revision 784)
+++ lib/SOAP/WSDL/Expat/MessageParser_XS.xs (working copy)
@@ -462,7 +462,7 @@

SV* ident_sv = SvRV(attribute_set);
// set object in attributeSet object
- add_element(attr_class_c, SvPV_nolen(ident_sv), SvCUR(ident_sv), attr[0], attr_obj);
+ add_element(attr_class_c, SvPV_nolen(ident_sv), SvCUR(ident_sv), attr[i], attr_obj);
// we only need to put the attr_obj into the slot with
// the current object's ID in global_xml_attr_ref

Best Regards
Martin Gojowsky


  • Martin Gojowsky

    Martin Gojowsky - 2009-02-18

    Testscript demonstrating the error

  • Martin Gojowsky

    Martin Gojowsky - 2009-02-25

    Done with revision 810.

  • Martin Gojowsky

    Martin Gojowsky - 2009-02-25
    • assigned_to: nobody --> gojowskym
    • status: open --> closed

Log in to post a comment.