# Can i use multiple HTTPService in one flex application?

**URL:** <https://forum.kirupa.com/t/can-i-use-multiple-httpservice-in-one-flex-application/282422>\
**Category:** flash\
**Created:** [February 21, 2009, 9:28pm UTC](https://forum.kirupa.com/t/can-i-use-multiple-httpservice-in-one-flex-application/282422 "2009-02-21T21:28:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimiorla](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@dimiorla](https://forum.kirupa.com/u/dimiorla)\
**Post date:** [February 21, 2009, 9:28pm UTC](https://forum.kirupa.com/t/can-i-use-multiple-httpservice-in-one-flex-application/282422/1 "2009-02-21T21:28:28Z")

</div>

[FONT=Times New Roman][SIZE=3]Hey everyone,[/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]  
[SIZE=3][FONT=Times New Roman]Can i use multiple HTTPService in one flex application?[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]I have tried the following but it can have only one creationComplete= " "[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]Is their any work around?[/FONT][/SIZE]

[COLOR=black][FONT=Verdana]\<?xml version=“1.0” encoding=“utf-8”?\>  
\<mx:Application xmlns:mx=“[http://www.adobe.com/2006/mxml](http://www.adobe.com/2006/mxml)” layout=“absolute” width=“1024” height=“800” backgroundColor=“white” creationComplete= “menu.send()”\>

\<mx:Script\>  
\<![CDATA[  
import mx.collections.ArrayCollection;  
import mx.rpc.events.ResultEvent;  
[Bindable]  
private var menuarray:ArrayCollection;  
private function menuhandler (event:ResultEvent):void  
{  
menuarray=event.result.response.data.row;  
}  
[Bindable]  
private var ordersarray:ArrayCollection;  
private function ordershandler (event:ResultEvent):void  
{  
ordersarray=event.result.response.data.row;  
}  
]]\>  
\</mx:Script\>

\<mx:HTTPService id=“menu” url=“[http://localhost/kassa/menu.php?method=FindAll](http://localhost/kassa/menu.php?method=FindAll)” result=“menuhandler(event)” /\>  
\<mx:HTTPService id=“orders” url=“[http://localhost/kassa/orders.php?method=FindAll](http://localhost/kassa/orders.php?method=FindAll)” result=“ordershandler(event)” /\>

\<mx:DataGrid y=“68.95” editable=“false” enabled=“true” width=“490” height=“682.05” fontFamily=“Times New Roman” fontSize=“25” id=“menudataGrid” dataProvider="{menuarray}" left=“10”\>  
\<mx:columns\>  
mx:DataGridColumn headerText=“id” dataField=“id” width=“50”/\>  
\<mx:DataGridColumn headerText=“name” dataField=“name” /\>  
\<mx:DataGridColumn headerText=“price” dataField=“price” width=“100”/\>  
\</mx:columns\>  
\</mx:DataGrid\>

\<mx:DataGrid y=“68.95” width=“490” height=“392.05” id=“ordersdataGrid” dataProvider="{ordersarray}" fontFamily=“Times New Roman” fontSize=“25” editable=“false” enabled=“true” right=“10”\>  
\<mx:columns\>  
\<mx:DataGridColumn headerText=“id” dataField=“id” width=“50”/\>  
\<mx:DataGridColumn headerText=“name” dataField=“name” /\>  
\<mx:DataGridColumn headerText=“price” dataField=“price” width=“100”/\>  
\</mx:columns\>  
\</mx:DataGrid\>

\</mx:Application\>[/FONT][/COLOR]  
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
