Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-369

xsd:dateTime becomes XMLGregorianCalendarImpl when Date needed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-RC
    • 2.0.1
    • Soap Binding
    • None
    • svn head, jax-ws api, annotations

    Description

      I have a web method:
      public Date echoDate(String sessionID, Date input);

      The soapUI 1.6 client works, but the Axis 1.3 client passes in xsi:type="xsd:dateTime". The CXF server turns the dateTime into a XMLGregorianCalendarImpl instead of a date when that is set. AbstractInvoker then fails at this call res = m.invoke(serviceObject, paramArray); with an IllegalArgumentException.

      Here is the full request that does not work:

      <soapenv:Envelope
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <echoDate xmlns="urn:TestService/wsdl">
      <sessionID>2CE0B857-43D1-F488-0E0A-F055FDCB8294</sessionID>
      <input xsi:type="xsd:dateTime">2008-01-19T00:29:48.889Z</input>
      </echoDate>
      </soapenv:Body>
      </soapenv:Envelope>

      Failure Response
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
      <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>argument type mismatch</faultstring>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>

      Removing 'xsi:type="xsd:dateTime"' makes it work.

      Attachments

        Activity

          People

            maomaode maomaode
            ctaggart Cameron Taggart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: