Forum: Ruby on Rails XMLRPC::DateTime from AWS

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
34791e1d8c4def65f9b93294638a7e04?d=identicon&s=25 Joerg Diekmann (joergd)
on 2006-01-20 15:42
When I do an XMLRPC webservice call to retrieve a single Product, my
DateTime fields in the products table do not get converted to a valid
DateTime value, but remain as XMLRPC::DateTime structures.

So, say my webservice call is:

@product = @aws.get_product(1)

Then my @product object looks like this:

name: My product
last_updated: #<XMLRPC::DateTime:0x37c5338>
description: This is my product.
unit_cost: 110.0

So, all values come through, but my DateTime value looks like the above.
It doesn't seem to be converted.

Incidentally, it all works well when I use SOAP.

Any ideas anybody? Am I missing something, or is this a bug?

P.S. I am using DateTime fields on a MySql database.
34791e1d8c4def65f9b93294638a7e04?d=identicon&s=25 Joerg Diekmann (joergd)
on 2006-01-20 22:37
I think this might be a bug in Rails.

http://dev.rubyonrails.org/changeset/2945

This patch seems to have fixed it, except, I suspect it fixed it for
when I am returning a date on its own, but if the datetime is inside a
returned ActiveRecord object, then it fails.

Is this something I need to report as a bug? Or has somebody got his
functionality working?

> So, say my webservice call is:
>
> @product = @aws.get_product(1)
>
> Then my @product object looks like this:
>
> name: My product
> last_updated: #<XMLRPC::DateTime:0x37c5338>
> description: This is my product.
> unit_cost: 110.0
>
> So, all values come through, but my DateTime value looks like the above.
> It doesn't seem to be converted.
This topic is locked and can not be replied to.