Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5439

adb codegen WSDL2C emits incorrect code for xsd:time and xsd:date (de)serialization

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.2
    • None
    • adb
    • None
    • Java (WinXP host)

    Description

      Class org.apache.axis2.schema.typemap.CTypeMap assigns the native datatype axis2_date_time_t to represent xsd:dateTime, xsd:date, and xsd:time in the generated code.

      The code generation template in file modules\adb-codegen\src\org\apache\axis2\schema\template\CADBBeanTemplateSource.xsl chooses the serializer and deserializer routines to call based on the native datatype. As a result the generated code contains calls to axutil_date_time_serialize_date_time for xsd:date and xsd:time types, where axutil_date_time_serialize_date and axutil_date_time_serialize_time are appropriate.

      Same applies for the axutil_date_time_deserialize_... calls.

      Potential fixes:

      Add typedef names for axis2_date_t and axis2_time_t, as aliases for struct axis2_date_time_t, and change the CTypeMap to use them.

      Modify the template to consider the schema type names when generating (de)serializers for axis2_date_time_t elements. I don't know enough to know whether this information is available to the template.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bgstewart@covad.net Bruce G Stewart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: