Dienstag, 20. November 2007

Get data from a WebService

Getting data from a webservice is pretty easy, but the first time I had the problem that the ResultEvent object had two different definitions, one when there is only one line in the table and the second when there is more than one line in the table.
When the query returns only one line the type of the event.result object is ObjectProxy, if the query returns more than one line the definition is an Array.
I can check this with a very simple static function that I put in an utility class. The function looks like this:


public static function IsObjectArray(obj: Object): Boolean
{
var className: String = ObjectUtil.getClassInfo(obj).name;
if (className=="mx.collections::ArrayCollection"){
return true;
}
return false;
}



Now when you getting data from a webservice you only have to do things link this:


private function getSomeDataFromMyWebservice(event: ResultEvent): void{
if (event.result){
if (.IsObjectArray(event.result)){
for each(var item: Object in event.result){
}
}else{
//event.result is from type Object.
}
}

16 Kommentare:

Anonym hat gesagt…

[u][b]Xrumer[/b][/u]

[b]Xrumer SEO Professionals

As Xrumer experts, we possess been using [url=http://www.xrumer-seo.com]Xrumer[/url] quest of a long leisure conditions and recollect how to harness the colossal power of Xrumer and go off it into a Banknotes machine.

We also purvey the cheapest prices on the market. Many competitors will expect 2x or temperate 3x and a end of the term 5x what we responsibility you. But we maintain in providing great help at a debilitated affordable rate. The entire something of purchasing Xrumer blasts is because it is a cheaper variant to buying Xrumer. So we focusing to abide by that thought in cognizant and outfit you with the cheapest standing possible.

Not only do we be suffering with the most successfully prices but our turnaround heyday for your Xrumer posting is super fast. We will have your posting done ahead of you certain it.

We also produce you with a sated log of well-heeled posts on different forums. So that you can get the idea for yourself the power of Xrumer and how we hold harnessed it to benefit your site.[/b]


[b]Search Engine Optimization

Using Xrumer you can think to realize thousands upon thousands of backlinks exchange for your site. Myriad of the forums that your Install you intent be posted on get acute PageRank. Having your join on these sites can truly expropriate found up some crown grade back links and as a matter of fact boost your Alexa Rating and Google PageRank rating owing to the roof.

This is making your put more and more popular. And with this better in regard as familiarly as PageRank you can expect to lead your milieu absolutely filthy high in those Search Motor Results.
Above

The amount of transportation that can be obtained aside harnessing the power of Xrumer is enormous. You are publishing your situation to tens of thousands of forums. With our higher packages you may regular be publishing your locality to HUNDREDS of THOUSANDS of forums. Ponder 1 collection on a popular forum disposition almost always cotton on to a leave 1000 or so views, with communicate 100 of those people visiting your site. At once devise tens of thousands of posts on celebrated forums all getting 1000 views each. Your freight will function because of the roof.

These are all targeted visitors that are interested or exotic far your site. Assume how many sales or leads you can succeed in with this considerable figure up of targeted visitors. You are truly stumbling upon a goldmine bright to be picked and profited from.

Reminisce over, Transport is Money.
[/b]

TRAVERSE B RECOVER YOUR CHEAP ERUPTION TODAY:


http://www.xrumer-seo.com

Anonym hat gesagt…

[B]NZBsRus.com[/B]
Forget Crawling Downloads With NZB Files You Can Easily Find HD Movies, Console Games, MP3s, Applications and Download Them at Alarming Rates

[URL=http://www.nzbsrus.com][B]Newsgroup[/B][/URL]

Anonym hat gesagt…

Louisville Kentucky is a close on developing cosmopolitan diocese in the United States of America. The city was established in 1778 next to George Rodgers Clark. The see is situated in North -central Kentucky on the Kentucky Indiana border. The town stands out surrounded by the safest cities in the In harmony States with a totality populace of 1,268,323 as at 2008. This is the 42nd most populated bishopric in the United States of America.

Louisville Kentucky borough is controlled on both the Metro mayor and a legislative essence called Metro Council. The Metro Council comprises of 26 seats which arrive from the 26 Districts constituting the Louisville Kentucky metropolitan area. The congregation is directed about the gathering president with 13 seats being reelected after each two years of state office.

Louisville Kentucky is the obligation to glorification in if you are looking in the interest of an perfect investment arena in the Synergistic States of America. The curtness of this city is radically improved with shipping and carload industries being the excellent developed. Louisville Kentucky is centrally situated in the US and features foremost boulevard networks and highways linking prominent cities across the US. It is also assisted next to a favourably developed train system that is excellent because of freight and fare traffic. Wiser stillness, Louisville is home to the Louisville Oecumenical Airport which is a intercontinental air hub with trendy trainload handling capabilities.

Louisville Kentucky is the hottest objective of churches assuring your weekends remarkable and gorged of fun. The burgh is served next to a vibrant media with identifiable foreign networks and newspaper coverage. Parks and outside attractions are within the burg environs making it sole of must-go-before-I-die cities. Don’t stand by, scrutinize insolent and wanderings to Louisville Kentucky first time thaws.
[url=http://louisvillekentucky.me/]Louisville Kentucky Attorney
[/url]

Anonym hat gesagt…

Divulge casinos? sift this energetic [url=http://www.realcazinoz.com]casino[/url] advisor and take competent in up online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also discontinuation our late [url=http://freecasinogames2010.webs.com]casino[/url] gen at http://freecasinogames2010.webs.com and cover determined folding shin-plasters !
another late-model [url=http://www.ttittancasino.com]casino spiele[/url] conspire is www.ttittancasino.com , in gain german gamblers, profit well-wishing online casino bonus.

Anonym hat gesagt…

Someone deleted several links from load2all and megaupload servers.

From now, we will use www.tinyurlalternative.com as our main [url=http://www.tinyurlalternative.com]url shortener[/url], so every url will be there and visible for everyone.

You can choose from several great [url=http://kfc.ms]short url[/url] names like:

kfc.ms easysharelink.info jumpme.info megauploadlink.info megavideolink.info mygamelink.info myrapidsharelink.info mytorrentlink.info myurlshortener.com mywarezlink.info urlredirect.info urlshrinker.info weblinkshortener.com youtubelink.info and many others.

They maintain above 60 other available domains and the [url=http://myurlshortener.com]url shortener[/url] service work properly for free without any registration needed.

So we think it is good notion and suggest you to use [url=http://urlredirect.info]url redirect[/url] service too!

Thank you.

Anonym hat gesagt…

Hello i'm new on your board but i cant read correctly a message. Bug in you site ? Thanks you

Anonym hat gesagt…

[b]Acai Berry Scams[/b]

Would you like a SELF-RULING, no strings or scams unavailable check of shiny Acai Berry? If so then venture the contribution that I and millions of others doctrine: – Acai Power Blare!

The One Devoted Factors: As you are in all strong already qualified (having convey round this website), although acai berries solidify up scientifically proven health benefits, and are of belt astonishing on losing weight, there are a horrifying amount of acai berry scams completely there. How and who can you trust?

Hearken Up: You know better than anyone else that you miss to contrive abet in statue, that’s the gluteus maximus shilling-mark, am I exact guys and girls? But it’s merely too iffy to check minus insensible the individual acai berry products nigh yourself– it’s wellnigh unworkable to ascertain what’s a scam and what isn’t. Check [url=http://acai-berry-scams-blog.com/]acai berry scams[/url] be enduring rigidly bewitched solitary more fix the internet.

My reverence is Nicole, and I’ve overtired months checking elsewhere all the assorted Acai Berry products. And you skilled in what? Amongst them, I’ve unfold barely only, yes that’s honest, righteous everybody offering that I’ve check in to trust. You can one deliberate on up my frustation! Why did I fork in default so much straightaway researching all the products? It was because of my care in acai berries. I was whole-heartedly strong-willed to reveal out a so to speak that in actuality works! And guess what? I’m quickly going to elucidate you that anyone objective upright here on this blog!

http://acai-berry-scams-blog.com/

Anonym hat gesagt…

It isn't hard at all to start making money online in the undercover world of [URL=http://www.www.blackhatmoneymaker.com]blackhat seo forums[/URL], It's not a big surprise if you haven’t heard of it before. Blackhat marketing uses not-so-popular or misunderstood methods to build an income online.

Anonym hat gesagt…

You could easily be making money online in the underground world of [URL=http://www.www.blackhatmoneymaker.com]blackhat hacking[/URL], You are far from alone if you haven’t heard of it before. Blackhat marketing uses little-known or little-understood avenues to produce an income online.

Anonym hat gesagt…

Predilection casinos? obsessed of get-up-and-go ok of this youthful [url=http://www.realcazinoz.com]casino[/url] advisor and blur online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also into our untrained [url=http://freecasinogames2010.webs.com]casino[/url] orientate at http://freecasinogames2010.webs.com and be heiress to in useful folding spondulix !
another elegant [url=http://www.ttittancasino.com]casino spiele[/url] r‚sum‚ is www.ttittancasino.com , in convalesce german gamblers, exhausted it off with b superintend unrestrained online casino bonus.

Anonym hat gesagt…

www.betextremesoft.com

Anonym hat gesagt…

www.pornvideoonline.info

http://www.pornvideodownload.info

http://www.pornvideotorrent.info

http://www.gaypornonline.info/

www.teenpornonline.info

http://www.freepornvideosonline.info

www.bestpornvideo.info

[url=http://www.pornvideoonline.info]Porn video online[/url]
[url=http://www.pornvideodownload.info]Porn video download[/url]
[url=http://www.pornvideotorrent.info]Porn video torrent[/url]
[url=http://www.gaypornonline.info]Gay porn online[/url]
[url=http://www.teenpornonline.info]Teen porn online[/url]
[url=http://www.freepornvideosonline.info]Free porn videos online[/url]
[url=http://www.bestpornvideo.info]Best porn video[/url]

Anonym hat gesagt…

money www.333eur.com

Anonym hat gesagt…

resource for [b]buy software for windows[/b] is available here:

buy software for windows
[url=http://www.buysoftwareforwindows.com]buy software for windows[/url]

[url=http://www.buysoftwareforwindows.com/products/buy-video-to-flv-converter/productpage.php]buy video to flv converter[/url]

buy flv to mp3 converter

Anonym hat gesagt…

address for [b]download software for windows[/b] are available at:

download software for windows
[url=http://www.downloadsoftwareforwindows.com]download software for windows[/url]

[url=http://www.downloadsoftwareforwindows.com/products/download-zune-video-converter/productpage.php]download zune video converter[/url]

download dvd to 3gp converter

Anonym hat gesagt…

Hello. Facebook takes a [url=http://www.nodepositbonus.gd]casino games[/url] move on on 888 casino disburse: Facebook is expanding its efforts to make something rash real-money gaming to millions of British users after announcing a carry out with the online gambling cast 888 Holdings.And Bye.