Solved

Calling HttpService Response From Flex AIR

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

627 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