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

java.util.Date type parameters break ws execution

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.6.0
    • Component/s: adb
    • Labels:
      None
    • Environment:
      Apache Tomcat/6.0.20

      Description

      There is a problem in Date type parameter processing. Just deploy a pojo with the following method:

      public Date testDate(Date date) {
      return date;
      }

      and then invoke the ws with the following request:

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <q0:testDate>
      <q0:date>2009-11-18</q0:date>
      </q0:testDate>
      </soapenv:Body>
      </soapenv:Envelope>

      and you get an error.

      In order to fix this problem, you have to change the line 313 in class org.apache.axis2.databinding.typemapping.SimpleTypeMapper from

      return ConverterUtil.convertToDateTime(source).getTime();

      to

      return ConverterUtil.convertToDate(source);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mikero Mike
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: