Groups > Multimedia > Macromedia rich int apps > Re: How to Configure the HttpService




How to Configure the HttpService

How to Configure the HttpService
Tue, 9 May 2006 09:56:48 +0000
Hi,

 I am a newbiee for flex developement .

 Through the HttpService how to Communicate from mxml to Servlet .

 How to specify  the url property to a servlet class .

 my application needs to send the data to servlet class through request ..

 can anybody help me for this

 thanks in advance.

Post Reply
Re: How to Configure the HttpService
Fri, 12 May 2006 10:59:20 +000
    <mx:HTTPService id="serverSide" url="servlet.php"
useProxy="false" 
method="POST">
 	    <mx:request xmlns="">
 		  <saveData>{textarea1.text}</saveData>
 	    </mx:request>
     </mx:HTTPService>


 your servlet url goes into the url field there, on request the xml data 
contained in saveData would be sent to POST variable, which you should be able 
to retrieve in the normal way in your servlet code (ie. in php through $_POST).



Post Reply
Re: How to Configure the HttpService
Fri, 12 May 2006 11:00:21 +000
Post Reply
Re: How to Configure the HttpService
Tue, 16 May 2006 05:27:43 +000
u can use httpservice this way 

 suppose u r using login mxml file in that u can use

 <mx:HTTPService id="LogginReq" url="<a target=_blank 
class=ftalternatingbarlinklarge 
href="http://deepakt:8080/PopMailConnector/servlet/Login"">htt
p://deepakt:8080/P
opMailConnector/servlet/Login"</a> method="POST"
showBusyCursor="true"
  useProxy="false" 
result="event.result.response.result=='OK'?currentState='inbox':msg.text=ev
ent.r
esult.response.message"  
fault="mx.controls.Alert.show(event.fault.faultString)">
  <mx:request>
     <user>{uname.text}</user>
     <pass>{upass.text}</pass>
  </mx:request>
 </mx:HTTPService>


 .............................
 and in any button click or using other componet

 u have to send this request

 say
 <mx:Button label="Login" id="loginButton"
click="LogginReq.send();">
Post Reply
Re: How to Configure the HttpService
Tue, 16 May 2006 05:28:41 +000
u can use httpservice this way 

 suppose u r using login mxml file in that u can use

 <mx:HTTPService id="LogginReq" url="<a target=_blank 
class=ftalternatingbarlinklarge 
href="http://deepakt:8080/PopMailConnector/servlet/Login"">htt
p://deepakt:8080/P
opMailConnector/servlet/Login"</a> method="POST"
showBusyCursor="true"
  useProxy="false" 
result="event.result.response.result=='OK'?currentState='inbox':msg.text=ev
ent.r
esult.response.message"  
fault="mx.controls.Alert.show(event.fault.faultString)">
  <mx:request>
     <user>{uname.text}</user>
     <pass>{upass.text}</pass>
  </mx:request>
 </mx:HTTPService>


 .............................
 and in any button click or using other componet

 u have to send this request

 say
 <mx:TextInput id="uname" text="test@yahoo.com"/>
  <mx:TextInput id="upass" text="test"
password="true"/>
 <mx:Button label="Login" id="loginButton"
click="LogginReq.send();">
Post Reply
about | contact