Saurahb,
You can construct a webservice component:
<mx:WebService
id="myWS"
wsdl=http://somedomain.com/mywsdl.asmx?wsdl
result="resultHandler(event)"/>
Then handle the results in an ActionScript function:
public function resultHandler(event:ResutEvent):void
{
myTextArea.text = event.result.lastResult.toString();
}
you'll have to play round with it on your own, but that should be enough
to get you started.
Blake
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Thursday, August 30, 2007 11:48 AM
To: [email protected]
Subject: RE: [flexcoders] Access web service
So how far have you gotten on the Flex side?
Tracy
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of saurabh_flexcoder
Sent: Thursday, August 30, 2007 8:25 AM
To: [email protected]
Subject: [flexcoders] Access web service
Hi guys,
Again a newbee question.
I want to acess a .net webservice which exposes/returns the data a
dataset.
The sample code be could this.
****
OracleConnection conn1 = new
OracleConnection(System.Configuration.ConfigurationSettings.AppSettings
["jm"]);
conn1.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn1;
cmd.CommandText = "job_pkg.get_jobs";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("p_msg", OracleType.VarChar, 50);
cmd.Parameters.Add("result_set", OracleType.Cursor);
cmd.Parameters["p_msg"].Direction = ParameterDirection.Output;
cmd.Parameters["result_set"].Direction =
ParameterDirection.Output;
OracleDataAdapter da = new OracleDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
conn1.Close();
return ds;
*****
The web service returns the dataset(in the native xml format)
Now i want to consume this web service in my flex application.
I have read few posts that "e4x mode of consumin the web services"
works wonders with web services
I am struggling a bit with this and havent reached to the solution
Any help on this would be greatly appreciated.
Thanks to all!!!
-saurabh