PDA

View Full Version : Send data to webservice


bosewicht
04-22-2009, 10:33 PM
ok, so i have a webservice for data requests that only has a few fields. Name, Phone Number, date, email, and description. My webservice seems to be working fine, but i need some help sending from Flex to the service. I have googled a lot and most of what i see is querying to a datagrid, but none on sending to a websevice to insert into a database. The database is sql server 2005 and the asmx page is C#. Any help would be great.

Thanks in advance.

chadzilla
04-23-2009, 01:27 PM
Sending is easy...

<mx:WebService id="ws_login_portal" wsdl="http://www.YOURURL.com/YourPATH/WEBSERVICENAME.cfc?wsdl">
<mx:operation name="check_login" resultFormat="e4x" result="val_results(event)">
<mx:request>
<usernam>{uname.text}</usernam>
<password>{pword.text}</password>
</mx:request>
</mx:operation>
</mx:WebService>

{uname.text} and {pword.text} are text boxes on the page...this will send the values to the webservice. You must name the <usernam></usernam> to whatever is expecting the data in your webservice.

supriyaakg
03-23-2011, 08:08 AM
How to send object type data from ActionScript 2 (FlashLite 3) to wsdl webservice?

drkstr
03-23-2011, 08:11 PM
You may want to start a new thread on the AS2 board.

supriyaakg
03-24-2011, 05:16 AM
Yeah, but I dont find the option to start a new thread.