Solved

Calling HttpService Response From Flex AIR

Posted on 2008-06-19
1
857 Views
Last Modified: 2009-03-14
Hi Experts,
I am facing one problem, we need to call httpservices from AIR Appllication and then read the response from that httpservices.
please tell us is it possible if than please send the sample example.

Thanks and Regards,
dojjol
0
Comment
Question by:dojjol
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
Siva Prasanna Kumar earned 500 total points
ID: 21830000
Here is a simple example using Flex code inside AIR you can achieve it. (change the URL's accordingly I was invoking my local servlet)

better details at:

http://livedocs.adobe.com/flex/2/langref/mx/rpc/http/mxml/HTTPService.html
<mx:Script>
	<![CDATA[
		import mx.rpc.events.ResultEvent;
		import mx.rpc.events.FaultEvent;
		import mx.controls.Alert;
		
		public function handleFault(event:FaultEvent):void
		{
			Alert.show("A Fault occured. Fault message is :"+event.fault);
		}
		
		public function handleResult(event:ResultEvent):void
		{
			Alert.show("Resut:"+event.result.toString());
		}
	]]>
</mx:Script>
	<mx:HTTPService id="EmployeeMangerClient" url="http://localhost:9000/employeeManagerService/employee/7"
fault="handleFault(event)" result="handleResult(event)" resultFormat="xml">
 
</mx:HTTPService>

Open in new window

0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Converting SWF file to earlier swf versions 7 286
check for non negative number 2 455
adobe air 1 312
Include Adobe AIR libraries in Flash Builder 4 157
First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Invest in your employees with these five simple steps to improve employee engagement and retention.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question