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

error on array of xsd:date

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • adb

    Description

      If a schema use an array of xsd:date there is an exception on unmashalling xml to adb objects.

      Solution:

      add the code below to class org.apache.axis2.databinding.utils.ConverterUtil.java in method public static Object convertToArray(Class baseArrayClass, List objectList) at line 1148

      } else if (Date.class.equals(baseArrayClass)) {
      Date[] array = new Date[listSize];
      for (int i = 0; i < listSize; i++) {
      Object o = objectList.get;
      if (o != null) {
      if (o instanceof String)

      { array[i] = ConverterUtil.convertToDate(o.toString()); }

      else if (o instanceof Date)

      { array[i] = (Date) o; }

      }
      }
      returnArray = array;

      Attachments

        Activity

          People

            Unassigned Unassigned
            marcoben73 Marco Benuzzi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: