Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1699

Wrong C code generation for sequence types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 1.7.0
    • code generation
    • None
    • Fedora 20

    Description

      When generating the C code with

      $AXIS2C_HOME/bin/tools/wsdl2c/WSDL2C.sh -uri $WSDL_PATH -ss -sd -d adb -u -o $SKEL_OUT_PATH
      

       

      For an element like:

       

          <xsd:complexType name="MyType">
              <xsd:sequence>
                  <xsd:element name="MyName" type="MyElementType" minOccurs="0" maxOccurs="unbounded"/>
              </xsd:sequence>
          </xsd:complexType>

      (notice the `maxOccurs="unbounded"`)

       

       

      The type of "MyElementType" is incorrectly set to the parent "MyType" element and hence the generated message is wrong.

       

      To workaround the issue it's necessary to comment out the following line in the generated type "adb_MyElementType.c", function  "adb_MyElementType_serialize_obj":

      axiom_element_add_attribute (parent_element, env, xsi_type_attri, parent);

       

      reported by rbarriuso

      Original submission: https://issues.apache.org/jira/browse/AXIS2-5958

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            billblough Bill Blough
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: