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

Generated code failed to compile when the type names in WSDL has '.'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.0
    • None
    • wsdl2c tool
    • None

    Description

      My WSDL file has a simple type that has '.' in its name

      <wsdl:definitions ...>
      <wsdl:types>
      <xs:schema ...>
      <xs:simpleType name="Test.Types">
      <xs:restriction base="xs:string">
      <xs:enumeration value="TEST_TYPE_UNKNOWN"/>
      <xs:enumeration value="TEST_TYPE_A"/>
      <xs:enumeration value="TEST_TYPE_B"/>
      </xs:restriction>
      </xs:simpleType>
      ...

      The generated code has

      /* Enumeration for this type */
      typedef enum

      { TEST_TYPE_UNKNOWN, TEST_TYPE_A, TEST_TYPE_B } adb_Test.Types_enum_t;

      A close look shows that the name comes from CADBBeanTemplateHeader.xsl and CADBBeanTemplateSource.xsl,

      <xsl:variable name="enum">adb_<xsl:value-of select="$propertyName"/>_enum_t</xsl:variable>

      I replaced adb_<xsl:value-of select="$propertyName"/> with<xsl:value-of select="$axis2_name"/>, and the generated code seems happy,

      /* Enumeration for this type */
      typedef enum { TEST_TYPE_UNKNOWN, TEST_TYPE_A, TEST_TYPE_B }

      adb_Test_Types_enum_t;

      Attachments

        Activity

          People

            Unassigned Unassigned
            hengli_wang Hengli Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: