  | | | Web Service Results - Solved | Web Service Results - Solved 2004-03-16 - By Keith L. Miller
Back Nope, same results as before, but I did figure out what is wrong. I was trying to trace "result", instead of "results". I guess I should rename my object as to not confuse the issue next time. Here's some code that works:
var loadXML = function (result){ trace("Results : "+result.target.results); } _root.myWSC.trigger(); _root.myWSC.addEventListener("result", loadXML); _root.myWSC.addEventListener("status", sta);
Thanks again,
Keith
-- -- Original Message -- -- From: "Accattato, Dominick (OFT)" <Dominick.Accattato@(protected)> To: <flashcoders@(protected)> Sent: Tuesday, March 16, 2004 2:26 PM Subject: RE: [Flashcoders] Web Service Results
> var loadXML = function (result){ > trace("Results : "+result); > > for(var i in result) { > trace(result[i]); > } > } > > -- --Original Message-- -- > From: Keith L. Miller [mailto:millerk@(protected)] > Sent: Tuesday, March 16, 2004 3:13 PM > To: flashcoders@(protected) > Subject: Re: [Flashcoders] Web Service Results > > Thanks, but that returns this: > > 256 levels of recursion were exceeded in one action list. > This is probably an infinite loop. > Further execution of actions has been disabled in this movie. > > Also, this line: > > if(typeof(aObject[i] =="object"){ > > is missing a parenthesis (for others who try to use it), it should be: > > if(typeof(aObject[i] =="object")){ > > Anyway, I have my web service returning a simple string "Hello World" > and I > get the same results (shown above) as I do if I return a query or some > complex XML structure. Maybe the issue is with the way I'm calling the > web > service? Did that code look correct? > > Thanks again, > > Keith > > > -- -- Original Message -- -- > From: "FODOR" <fodor@(protected)> > To: <flashcoders@(protected)> > Sent: Tuesday, March 16, 2004 1:58 PM > Subject: Re: [Flashcoders] Web Service Results > > > > You could try something like: > > > > var loadXML = function (result){ > > traceObject(result) > > } > > function traceObject(aObject){ > > for(var i in aObject){ > > if(typeof(aObject[i] =="object"){ > > traceObject(aObject[i]); > > } else { > > trace(i+": "+aObject[i]); > > } > > } > > } > > > > (16/03/04 20:21) Keith L. Miller wrote: > > > > > I am returning a string from a ColdFusion WebService to my flash app > using > > > the code below: > > > > > > var loadXML = function (result){ > > > trace("Results : "+result); > > > } > > > > > > _root.myWSC.trigger(); > > > _root.myWSC.addEventListener("result", loadXML); > > > _root.myWSC.addEventListener("status", sta); > > > > > > The connection works fine and the loadXML function runs, but when I > trace > > > result, I get: > > > > > > [object Object] > > > > > > I need to be able to see the result sent back. How can I see what > is > inside > > > of the object? > > > > > > Thanks, > > > > > > Keith > > > > > > > > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > > > Supported by Fig Leaf Software > > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > > > Be sure to check the archives and the wiki: > > > http://chattyfig.figleaf.com/ > > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > > > http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107127 > > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > > > To unsubscribe send a blank e-mail to: > > > Normal Mode: flashcoders-unsubscribe@(protected) > > > Digest Mode: flashcoders-digest-unsubscrive@(protected) > > > > > > > -- ---- ---- ---- ---- ---- ---- ---- ---- > > Pascal FODOR > > > > -- ---- ---- ---- ---- ---- ---- ---- ---- > > fodor@(protected) // flash@(protected) > > > > ****************************************** > > Visit: http://fodor.liane.net > > > > Flash AV Players can be seen at: > > http://fodor.liane.net/flash_AV_players/ > > ****************************************** > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > > Supported by Fig Leaf Software > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > > Be sure to check the archives and the wiki: > > http://chattyfig.figleaf.com/ > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > > http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107129 > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > > To unsubscribe send a blank e-mail to: > > Normal Mode: flashcoders-unsubscribe@(protected) > > Digest Mode: flashcoders-digest-unsubscrive@(protected) > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > Supported by Fig Leaf Software > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > Be sure to check the archives and the wiki: > http://chattyfig.figleaf.com/ > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107131 > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > To unsubscribe send a blank e-mail to: > Normal Mode: flashcoders-unsubscribe@(protected) > Digest Mode: flashcoders-digest-unsubscrive@(protected) > > > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > Supported by Fig Leaf Software > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > Be sure to check the archives and the wiki: > http://chattyfig.figleaf.com/ > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107133 > =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- > To unsubscribe send a blank e-mail to: > Normal Mode: flashcoders-unsubscribe@(protected) > Digest Mode: flashcoders-digest-unsubscrive@(protected)
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107134 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |