Hi Daniel,

I'm having the same problem but using AMFPhp, did you finally solve it?

Thanks,
Oriol.

2006/6/26, Daniel Tuppeny < [EMAIL PROTECTED]>:
 
I think this is definately a bug. Attached is a screenshot showing my dates that are strings, and the relevant part of the WSDL (all items with string dates are of one of the types included there). The dates at the top level are fine, but those deeper down have just been changed to strings.
 
I'll keep trying to reproduce it in a small sample I can post, but if anyone has any ideas, they'd be most welcome.


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Daniel Tuppeny
Sent: 26 June 2006 15:09
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] "Type Coercion failed" Error when returning date from web service

I tried to recreate this with a simple example, and it didn't happen. I think the dates might be being changed to strings when passed into my component, like this:
 
<mx:Script>
  <![CDATA[
   [Bindable]
   public var dataProvider:Object;
   
   [Bindable]
   public var displayType:String;
  ]]>
 </mx:Script>
 
 <mx:TitleWindow title="Timeline" width="100%" height="100%">
  <link:TimelineBox dataProvider="{dataProvider}" width="100%" displayType="{displayType}" />
 </mx:TitleWindow>
 
I'm in the process of creating a simple version of that too :-(
 
 

From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Daniel Tuppeny
Sent: 26 June 2006 11:15
To: flexcoders@yahoogroups.com
Subject: [flexcoders] "Type Coercion failed" Error when returning date from web service

More date madness.

Some of the dates from our web services come out as dates in Flex. However, now I'm returning a whole tree of objects, I'm having issues. The type in question is defined in the WSDL as this:

<s:complexType name="Event">
    <s:complexContent mixed="false">
        <s:extension base="tns:Item">
            <s:sequence>
                <s:element minOccurs="1" maxOccurs="1" name="StartDate" type="s:dateTime" />
            </s:sequence>
        </s:extension>
    </s:complexContent>
</s:complexType>

Which correctly has the DateTime type. When I try to access is in Flex, I get this error:

TypeError: Error #1034: Type Coercion failed: cannot convert "2006-09-28T11:13:52.2254775+01:00" to Date.
 at TimelineRow$iinit()

If I create a simple web service that directly returns a date, it's fine. I'm not sure why! :-(


The information contained in this e-mail and/or any attachments is confidential and intended only for the individual(s) to which it is addressed. If you are not named as an addressee you must not disclose, copy or take any action in reliance of this transmission. This e-mail and its attachments have been scanned for viruses by MessageLabs Ltd.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

[Inbound Mail Scanned by MessageLabs]

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

[Inbound Mail Scanned by MessageLabs]

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





YAHOO! GROUPS LINKS




__,_._,___

Reply via email to