Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Calling HttpService Response From Flex AIR

Posted on 2008-06-19
1
Medium Priority
?
861 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 2000 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

Enhanced Intelligibility Without Cable Clutter

Challenge: The ESA office in Brussels wanted a reliable audio conference system for video conferences. Their requirement - No participant must be left out from the conference and the audio quality must not be compromised.

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…
By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

721 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