Hi Tim,

Thanks for the reply. I actually got past that initial hurdle with the code changes I showed in my first email, but am still having trouble resolving the second problem. Its like even though the structure is the same, I cannot access it using the original syntax. I am unfortunately not able to try casting to an ArrayCollection at the moment, but I will give it a shot when I return to work tomorrow.

Can anyone else shed some light on this issue?

Thanks,
Ben




On 5/30/06, Tim Hoff <[EMAIL PROTECTED] > wrote:
Hi Ben,

I'm not sure if this will help, but it's better than nothing.  I've
found that casting the result object to an ArrayCollection makes it
easier to work with the data.  Also, since you are currently working
with objects, you might try comparing to "undefined" instead
of "null".

Regards,
Tim Hoff

--- In [email protected], "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> Anyone? Is there a problem with the way I am asking my question?
Do I
> need to provide a more concise example? I have never had a
question go
> unanswered for so long. Any help is greatly appreciated.
>
> Thanks,
> Ben
>
> --- In [email protected], "ben.clinkinbeard"
> <ben.clinkinbeard@> wrote:
> >
> > Hello, I am having some strange issues moving from B2 to B3 that
I
> > can't seem to find dosumented anywhere. It seems that the objects
> > created from my WS results are being parsed differently. For
instance,
> > here is some return xml.
> >
> > <Client>
> >    <EnterpriseId>99999</EnterpriseId>
> >    <ClientName>Film Ltd.</ClientName>
> >    <Plans>
> >       <Plan>
> >          <PlanNumber>55555</PlanNumber>
> >          <PlanName>RETIREMENT SAVINGS PLAN</PlanName>
> >       </Plan>
> >    </Plans>
> > </Client>
> >
> > Depending on the data, there can sometimes be multiple Plan
nodes. My
> > code in B2 to check and deal with this was:
> >
> > if(obj_data.Plans.Plan.PlanNumber != null)
> > {
> >     str = obj_data.Plans.Plan.PlanNumber;
> > }
> > else
> > {
> >     var i:Number = 0;
> >     while(obj_data.Plans.Plan[i] != null)
> >     {
> >             str += (str.length > 0) ? "\n" : "";
> >             str += obj_data.Plans.Plan[i].PlanNumber;
> >             i++;
> >     }
> > }
> >
> > but in B3 that throws an error. Something about
obj_data.Plans.Plan
> > being undefined. In B3 I have to change the code to:
> >
> >
> > if(obj_data.Plans.length == 1)
> > {
> >     str = obj_data.Plans[0].PlanNumber;
> > }
> > else
> > {
> >     var i:Number = 0;
> >     while(obj_data.Plans[i] != null)
> >     {
> >             str += (str.length > 0) ? "\n" : "";
> >             str += obj_data.Plans[i].PlanNumber;
> >             i++;
> >     }
> > }
> >
> >
> > I am also having problems displaying WS results in other places
in my
> > app. Did something change in B3 concerning how XML and/or WS
responses
> > are parsed into objects?
> >
> > Thanks,
> > Ben
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->

--
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/







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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to