Matt, Thanks for replying to all my posts.. as you could probably tell they were all related. I have gone from web services to RemoteObjects and now get XML (e4x) objects back correctly. In fact I even get charts using the XMLListCollection wrapper!
I guess the web service problem and the decoder problem are worked around for now. (just by using RemoteObjects and XMLListCollections) thanks, Thunder --- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> wrote: > > Well that logic was intentional as when we see a 0 prefix and we don't > know the type (b/c as you said we don't have the schema) we leave it as > a String. This was based on feedback from our users. In fact there has > been debate over whether we should just deserialize everything as > Strings even if we think it could be turned into a number, and move that > responsibility to the developers so that at least we'd be consistent. > > So, sorry! I guess I'd recommend having the response come back in e4x > format and then doing your own parsing. > > Matt > > -----Original Message----- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of thunderstumpgesatwork > Sent: Wednesday, February 01, 2006 3:43 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Help with XMLDecoder > > I should have been specific about the version... I'm used to posting > on the Flex2 Labs Forums... I am using Flex 2.0 (now upgrading to the > Beta) > > The reason I really need to use the schema is that there is a defect > (may be fixed in Beta?) with the auto-conversion from XML result to > Object that incorrectly typed '0' and '0.23' etc... any number < 1 as > a string. This was causing stacked charts to choke. I posted this on > the Flex2 Labs Forum and never got any response. > > Also, how can this be invoked without the SchemaContext? And can it be > invoked with the e4x XML object? > > Thanks, > Thunder > > --- In flexcoders@yahoogroups.com, "Matt Chotin" <mchotin@> wrote: > > > > Unfortunately those classes never really got working for random usage > > which is why they're not documented. We've only got them tested for > > HTTPService decoding (no schema) and WebService decoding. > > > > I think I would probably just get past the schema information and move > > straight to the ROWSET if possible and start parsing from there. > > > > E4X in Flex 2 will of course make this easier. > > > > Matt > > > > -----Original Message----- > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > On > > Behalf Of thunderstumpgesatwork > > Sent: Monday, January 30, 2006 2:02 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Help with XMLDecoder > > > > Hello, > > > > I am hoping someone can help get me started on this task. I am getting > > an XML string back from a web service call which I load into an XML > > object. Part of the XML string contains the XSD schema for the actual > > data. (the XML is actually an Oracle ResultSet that has been > > serialized to an XML string including schema. (see sample included > > below). > > > > I noticed that the XMLDecoder class takes as parameters a > > SchemaVersion, and a SchemaContext class as parameters in addition to > > the root node. From what I can tell from the signatures for the > > SchemaContext class, it has a SchemaVersion proeprty to it. I see a > > 'registerSchemaNode' method, and I would hope that I could take the > > schema node portion of the XML result object and register this > > SchemaContext class? > > > > Is this the correct approach? Can someone provide just a tad bit of > > guidance on this? I can't seem to find a single bit of documentation > > on this (other than the class signatures)... > > > > Thanks in advance, > > Thunder > > > > See the XML payload I have below... > > _____________________________ > > > > <?xml version = '1.0'?> > > <DOCUMENT xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > <xsd:element name="ROWSET"> > > <xsd:complexType> <xsd:sequence> > > <xsd:element name="ROW" minOccurs="0" maxOccurs="unbounded"> > > <xsd:complexType> <xsd:sequence> > > <xsd:element name="Carrier" nillable="true" minOccurs="0"> > > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength > > value="50"/> </xsd:restriction> </xsd:simpleType> > > </xsd:element> > > <xsd:element name="Year" nillable="true" minOccurs="0"> > > <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength > > value="4"/> </xsd:restriction> </xsd:simpleType> > > </xsd:element> > > <xsd:element name="NetAdds" type="xsd:integer" nillable="true" > > minOccurs="0"/> > > <xsd:element name="EndSubs" type="xsd:integer" nillable="true" > > minOccurs="0"/> > > <xsd:element name="NetHandsets" type="xsd:integer" nillable="true" > > minOccurs="0"/> > > <xsd:element name="QCTShare" type="xsd:integer" nillable="true" > > minOccurs="0"/> > > </xsd:sequence> > > <xsd:attribute name="num" type="xsd:integer"/> > > </xsd:complexType> > > </xsd:element> > > </xsd:sequence> </xsd:complexType> > > </xsd:element> > > </xsd:schema> > > <ROWSET xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > xsi:noNamespaceSchemaLocation="#/DOCUMENT/xsd:schema[not(@targetNamespac > > e)]"> > > <ROW num="1"> <Carrier>ATT</Carrier> <Year>2003</Year> > > <NetAdds>21.983</NetAdds> <EndSubs>21.983</EndSubs> > > <NetHandsets>23.731</NetHandsets> <QCTShare>0</QCTShare> </ROW> > > <ROW num="2"> <Carrier>ATT</Carrier> <Year>2004</Year> > > <NetAdds>-21.983</NetAdds> <EndSubs>0</EndSubs> > > <NetHandsets>-8.741</NetHandsets> <QCTShare>0</QCTShare> </ROW> > > <ROW num="3"> <Carrier>ATT</Carrier> <Year>2005</Year> > > <NetAdds>0</NetAdds> <EndSubs>0</EndSubs> <NetHandsets>0</NetHandsets> > > <QCTShare>0</QCTShare> </ROW> > > <ROW num="4"> <Carrier>ATT</Carrier> <Year>2006</Year> > > <NetAdds>0</NetAdds> <EndSubs>0</EndSubs> <NetHandsets>0</NetHandsets> > > <QCTShare>0</QCTShare> </ROW> > > <ROW num="5"> <Carrier>ATT</Carrier> <Year>2007</Year> > > <NetAdds>0</NetAdds> <EndSubs>0</EndSubs> <NetHandsets>0</NetHandsets> > > <QCTShare>0</QCTShare> </ROW> > > <ROW num="6"> <Carrier>ATT</Carrier> <Year>2008</Year> > > <NetAdds>0</NetAdds> <EndSubs>0</EndSubs> <NetHandsets>0</NetHandsets> > > <QCTShare>0</QCTShare> </ROW> > > <ROW num="7"> <Carrier>ATT</Carrier> <Year>2009</Year> > > <NetAdds>0</NetAdds> <EndSubs>0</EndSubs> <NetHandsets>0</NetHandsets> > > <QCTShare>0</QCTShare> </ROW> > > <ROW num="8"> <Carrier>ATT</Carrier> <Year>2010</Year> > > <NetAdds>0</NetAdds> <EndSubs>0</EndSubs> <NetHandsets>0</NetHandsets> > > <QCTShare>0</QCTShare> </ROW> > > </ROWSET> > > </DOCUMENT> > > > > > > > > > > > > -- > > 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 > > > > > > > > > > > -- > 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 > -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/