IT Community - Software Programming, Web Development and Technical Support

Web Services in Flash

This is a discussion on Web Services in Flash within the Flash Actionscript Programming forums, part of the Web Development category; Web Services in Flash : To use a web services in flash, we must use WebService connector component. The WebServiceConnector component ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Flash Actionscript Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 08-16-2007, 02:04 AM
aramesh aramesh is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 71
aramesh is on a distinguished road
Default Web Services in Flash

Web Services in Flash :

To use a web services in flash, we must use WebService connector component. The WebServiceConnector component lets you introspect, access, and bind data between a remote web service and your Flash application. A single instance of a WebServiceConnector component can be used to make multiple calls to the same operation. To call more than one operation, use a different instance of a WebServiceConnector component for each operation.
To use the WebServiceConnector component, you need to load the web service's schema into the WebServiceConnector component. A web service's schema is defined by a Web Service Description Language (WSDL) file. The WSDL file, which is accessible through a URL, specifies a list of operations, parameters, and results that are exposed by the web service. Once the schema is loaded, you can proceed to add data bindings.
This example requires an active Internet connection because it uses a public web service. If you use a web service in your application, the web service must be located in the same domain as the SWF file for your application so the application can work in a web browser.

1. Drag a WebServiceConnector component to the Stage and name it tipsWSC.
2. In the Component inspector, click the Parameters tab, if not already selected.
3. Select the WSDLURL parameter, and type the following URL:

http://www.webservicex.net/ValidateEmail.asmx?WSDL

When you specify a web service for a WebServiceConnector component in this way, it is automatically added to the Web Services panel and is available to any application you create.
4. Select Operation, and select the IsValidEmail method.
5. Open the Components Inspecter panel.
6. Click the Schema tab and view the auto-generated schema for the web service.

The Schema tab displays a schematic representation of the service that you are calling. The parameters and results structure are defined within the schema. The Tips schema states that the service expects one String parameter, Email, when it is called; this is the write-only input, as indicated by the right-pointing arrow. The service returns a string as the result of the call; this is the read-only output, as indicated by the left-pointing arrow.

Once the web service's schema is brought into the Schema tab, the items identified within the schema can now be bound, using the Bindings tab, to a variety of UI controls to let users input values for the parameters and to get back and display the results of the web service.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-17-2007, 03:08 AM
Balasubramanian.S Balasubramanian.S is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 180
Balasubramanian.S is on a distinguished road
Default Re: Web Services in Flash

Hi Ramesh,

I read your post. Can you give me any url for sample webservices to test?

Thanks..

S.Balasubramanian..

Last edited by Balasubramanian.S : 08-17-2007 at 04:26 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-17-2007, 05:03 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: Web Services in Flash

Hi Bala,

I just put together a list of useful web services I've found.

Scientific Web Services :

http://www.webservicex.net/ConvertAc...tion.asmx?WSDL - Convert acceleration
http://www.webservicex.net/CovertPressure.asmx?WSDL - Convert Pressure
http://www.webservicex.net/ConvertDensity.asmx?WSDL - Convert Density
http://www.webservicex.net/ConverPower.asmx?WSDL - Convert Power
http://www.webservicex.net/ConvertAngle.asmx?WSDL - Convert Angles

Validation Web Services :

http://www.webservicex.net/CreditCard.asmx?WSDL - validate a credit card number
http://www.webservicex.net/ValidateEmail.asmx?WSDL - validate email address
http://www.tpisoft.com/smartpayments/validate.asmx?WSDL - validate credit card number
http://ws.cdyne.com/emailverify/Emai...mail.asmx?wsdl - validate email
http://ws.cdyne.com/phoneverify/phoneverify.asmx?wsdl - validate phone number

Bye.
__________________
The OXYGEN
Delivers edgy, intelligent Technology to all...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-17-2007, 05:53 AM
aramesh aramesh is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 71
aramesh is on a distinguished road
Default Re: Web Services in Flash

Hi EveryBody,
Already I have posted how to use the WerbService. Now posted the sample demonstration and a sample.
Using the WebServiceConnector component you can access remote methods exposed by a server using the industry-standard Simple Object Access Protocol (SOAP). A web service method can accept parameters and return a result.

1) Create a Flash Documnet.
2) Drag two Text Input component from the components window and give its Instance name as "inp_txt" and "res_txt".
3) Create one button to trigger the webserviceconnector component and give its instance name as "TestBtn".
4) Drag a WebServiceConnector component on to the stage and give its instance name as "wsconn".
5) Goto the properties window and select the WSDLURL. Enter this url
"http://www.webservicex.net/ValidateEmail.asmx?WSDL"
6) Select the operation properties, a combo box appeared. Click the combo and select the "IsValidEmail" value.
7) Open the Component Inspector window.
8) Select the webserviceconnector component and goto the component Inspector window.
9) Click the Bindings tab and click the plus symbol to bind the value to other UI components.
10) The params object shows the input variables for that webservice. Select the Email variable and click "ok" button.
11) Some properties are shown below, double click the "bound to" properties. It shows the "Bound To" dialog window select the "inp_txt" text box.
12) Click the plus symbol again, to bind the result on another text box.
13) The result object shows the output send from the webservice. Select the result object and click "ok" button.
14) Some properties are shown below, double click the "bound to" properties. It shows the "Bound To" dialog window select the "res_txt" text box.
15) Write the following codes on the main timeline.

TestBtn.onRelease=function(){
if(inp_txt.text!=""){
res_txt.text="";
wsconn.trigger();
}
else{
inp_txt.text="Enter the Email Id To Test.";
}
}

16) Enter the Email ID you want to check in the "inp_txt" textbox and press the Button. The result "True" (when the id is valid) or "False" (when the id is not valid) is shown on the "res_txt" text box.

Last edited by aramesh : 08-17-2007 at 06:03 AM. Reason: Attaching Sample zip file
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Services S.Vinothkumar Interview Questions & Answers and Tips 15 11-21-2007 05:36 AM
web services seetha ASP and ASP.NET Programming 4 11-13-2007 02:12 AM
Problem with AD Sites and Services vadivelanvaidyanathan Server Management 0 08-07-2007 11:34 PM
Web services prasath ASP and ASP.NET Programming 3 07-17-2007 10:16 PM
Web Services Tool vadivelanvaidyanathan Testing Tools 0 03-29-2007 09:41 PM


All times are GMT -7. The time now is 02:22 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0