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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| 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. |
| Sponsored Links |
| |||
| 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |
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 |