OFBiz
  1. OFBiz
  2. OFBIZ-2139

Service validation doesnt accept timestamp format 2009-01-15T00:00:00.000Z

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: SVN trunk
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
      None
    • Environment:

      WinXP / JDK1.6 / Postgre8.3

      Description

      When I request a value of type timestamp through a SOAP service call, the value returned has the format '2009-01-15T00:00:00.000Z'. When I return the same value as IN parameter to another service for updating the same field the value is not accepted as a valid timestamp.

      Error is:

      2009-01-25 18:54:44,919 (TP-Processor3) [ RequestHandler.java:326:ERROR] Request SOAPService caused an error with the following message: Error calling event: org.ofbiz.webapp.event.EventHandlerException: Type check failed for field [updateRelative.thruDate]; expected type is [java.sql.Timestamp]; actual type is [java.lang.String] (Type check failed for field [updateRelative.thruDate]; expected type is [java.sql.Timestamp]; actual type is [java.lang.String])

      Expected behavior > 2 options:
      1. format 2009-01-15T00:00:00.000Z should be accepted as a valid timestamp
      2. timestamp should be returned by SOAP service as '2009-01-15 00:00:00.000'

        Activity

        Gavin made changes -
        Field Original Value New Value
        Workflow jira [ 12451026 ] OFbiz Workflow [ 12507063 ]
        Hide
        Jacques Le Roux added a comment -

        Hi Mike,

        yes please do, we will review for sure.

        Show
        Jacques Le Roux added a comment - Hi Mike, yes please do, we will review for sure.
        Hide
        Mike Fanning added a comment -

        I ran into this issue while exporting services. It's not just a matter of one timestamp format or another, the SOAP handler passes all the parameters to the service as strings, which then causes the exception. I have a patch for this issue, but it doesn't directly address Adil's options. Should I attach it to this issue?

        Show
        Mike Fanning added a comment - I ran into this issue while exporting services. It's not just a matter of one timestamp format or another, the SOAP handler passes all the parameters to the service as strings, which then causes the exception. I have a patch for this issue, but it doesn't directly address Adil's options. Should I attach it to this issue?
        Hide
        Jacques Le Roux added a comment -

        Hi Adil,

        Could you please provide a patch for this ?

        Show
        Jacques Le Roux added a comment - Hi Adil, Could you please provide a patch for this ?
        Hide
        Adil BEN EL KHATTAB added a comment -

        Yes. I created a service with export='true'.

        Show
        Adil BEN EL KHATTAB added a comment - Yes. I created a service with export='true'.
        Hide
        Jacques Le Roux added a comment -

        Adil,

        When you say

        When I request a value of type timestamp through a SOAP service call, the value returned has the format '2009-01-15T00:00:00.000Z'.

        Do you mean using an OFBiz service with export="true" ?

        Show
        Jacques Le Roux added a comment - Adil, When you say When I request a value of type timestamp through a SOAP service call, the value returned has the format '2009-01-15T00:00:00.000Z'. Do you mean using an OFBiz service with export="true" ?
        Hide
        Adil BEN EL KHATTAB added a comment -

        So this excludes option 2 above. Option 1, however, is still a valid solution to this problem.

        Show
        Adil BEN EL KHATTAB added a comment - So this excludes option 2 above. Option 1, however, is still a valid solution to this problem.
        Hide
        Adrian Crum added a comment -

        Since the Timestamp string format is beyond our control - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Timestamp.html#valueOf(java.lang.String) - we should find out why the SOAP service is returning another format and see if it can be changed.

        Show
        Adrian Crum added a comment - Since the Timestamp string format is beyond our control - http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Timestamp.html#valueOf(java.lang.String ) - we should find out why the SOAP service is returning another format and see if it can be changed.
        Adil BEN EL KHATTAB created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Adil BEN EL KHATTAB
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development