Solved

Calling HttpService Response From Flex AIR

Posted on 2008-06-19
1
855 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
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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

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…
Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

943 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now