From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 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
<![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>
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
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
<s:complexType name="TimelineItem"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" /> </s:sequence> </s:complexType> <s:complexType name="Event"> <s:complexContent mixed="false"> <s:extension base="tns:TimelineItem"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="StartDate" type="s:dateTime" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType> <s:complexType name="RangeEvent"> <s:complexContent mixed="false"> <s:extension base="tns:Event"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="EndDate" type="s:dateTime" /> </s:sequence> </s:extension> </s:complexContent> </s:complexType>
vars.gif
Description: vars.gif