User Guide

Data connectivity (Flash Professional only) 275
To use the WebServiceConnector component, you need to load the web services 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.
You can load and view the schema of any web service by entering the URL into the
WSDLURL
parameter of a WebServiceConnector component instance.
The following example demonstrates how to load and view the schema for a web service that
provides helpful tips for different products. You add a WebServiceConnector component
instance on the Stage, specify the web service to use, and view the web services schema on the
Schema tab of the Component inspector.
Note: 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. For more information, see
“About data connectivity and security in Flash Player” on page 279.
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.flash-mx.com/mm/tips/tips.cfc?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 getTipByProduct method.
5.
Click the Schema tab and view the auto-generated schema for the web service: