-
1. Re: ColdFusion Remote Service Calls and Dates
Balaji Sridhar Sep 17, 2009 5:22 AM (in response to Christine Panus)Hi Christine,
Can you send us the snippet of your CF code so that we can take a look at it and provide an appropriate solution?
Thanks,
Balaji
-
2. Re: ColdFusion Remote Service Calls and Dates
Christine Panus Sep 17, 2009 11:19 AM (in response to Balaji Sridhar)Hi Balaji,
I have attached a demo of my proxy webservice called pxTest.cfc. pxTest.cfc contains two functions, testDate and pushBackTestDate. I also attached a simple Flex App called testDate.mxml. And a Test file called test.cfm.
Save pxTest.cfc to your CFC folder. Create a new project called TestDate. Go to the data/services tab, click "Connect to Data/Service" and select Data Service ColdFusion. Browse to PxTest.cfc and select it for the CFC location. Click Next, then click Finish. Configure ReturnType as Date for both pushBackTestDate and testDate. Paste the code from TestDate.mxml into the blank TestDate.mxml file that was created when you created the project TestDate. Run the TestDate.mxml application.
On load of the application a date was requested and received from pxTest.cfc. Click Confirm Test Date and note the date returned, and the milliseconds value for that date. Next click Push User Data back, this will call the method pushBackTestDate sending the date from the Flex app back into CF. All pushBackTestDate does is set the value returned into session and return it back to the Flex app again.
Click the button Show Pushed Data Result to see the date that was returned. In my tests this date no longer has a value for milliseconds. As long as pxTest.cfc and test.cfm run in the same session you will be able to see the dates sent and returned by running test.cfm. The dump of that session variable and time formatted versions of that variables are displayed below:
RETURNED {ts '2009-09-17 12:57:50'} SEND {ts '2009-09-17 12:57:50'} TimeFormat Send 12:57:50 13
TimeFormat Returned 12:57:50 0
Note the date sent contains milliseconds, the date returned does not have milliseconds. Hopefully this demo will work for you and demonstrate the issue. Please let me know if you need more information.Thanks,
Christine
-
TestDate.zip 1.3 K
-
-
3. Re: ColdFusion Remote Service Calls and Dates
Balaji Sridhar Sep 23, 2009 3:19 AM (in response to Christine Panus)Hi Christine,
Thanks for your attachments and detailed explanation.
We are able to reproduce your issue.
It looks like Flex is sending back the date with milli-seconds (we verified this through remoting using BlazeDS for a Java function).
So I think this could be an issue with CF (during de-serializing), can you log a bug in the CF bug base, http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html
Hope this helps!
Thanks,
Balaji